Skip to content

Commit

Permalink
Fix index for better search
Browse files Browse the repository at this point in the history
  • Loading branch information
skakac committed Nov 4, 2024
1 parent df777da commit 32e3705
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/models/token.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ export const TokenSchema = new mongoose.Schema<IToken>(
)

TokenSchema.index({ address: 1, chainId: 1 }, { unique: true })
TokenSchema.index({ name: 1 }, { collation: { locale: 'en', strength: 1 } })
TokenSchema.index({ symbol: 1 }, { collation: { locale: 'en', strength: 1 } })
TokenSchema.index({ name: 'text', symbol: 'text' })
TokenSchema.index({ chainId: 1 })
TokenSchema.index({ holders: -1 })
TokenSchema.index({ verified: -1 })
Expand Down

0 comments on commit 32e3705

Please sign in to comment.