Skip to content

🔍 Feat: Advanced Search with MeiliSearch/Elasticsearch #80

@Cedarich

Description

@Cedarich

Title: feat(search): integrate meilisearch for full-text nft discovery
Complexity Score: 200 points

Description
SQL LIKE queries are insufficient for a marketplace. We need a typo-tolerant, fast search engine to allow users to search collections, NFTs, and profiles by name, description, and attributes.

Requirements and Context

  • Engine: Use MeiliSearch (easier setup) or Elasticsearch.
  • Syncing:
    • When an NFT is minted/updated, sync data to the search index.
    • When a User updates their profile, sync data.
  • Features: Fuzzy search, faceting (filtering by traits/attributes), sorting.

Suggested Execution

  1. Install meilisearch-js (or relevant client).
  2. Create SearchService to handle indexing and querying.
  3. Add event listeners (e.g., OnEvent('nft.created')) to trigger indexing asynchronously.
  4. Create GET /search?q=... endpoint that proxies to the search engine.

Test and Commit

  • Mock the search client in tests.
  • Verify that calling SearchService.indexNft sends correct payload.
  • Commit Message: feat(search): integrate meilisearch for full-text nft discovery

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions