Meroku Knowledge Hub
GithubMeroku Protocol
  • 🎨The Ecosystem
    • Meroku Protocol
      • Personas In The Ecosystem
    • dApp Store Kit (dSK)
      • Use Cases
    • dApp-sdk
      • Modules
    • PWAs X Meroku
  • 💁Using Meroku
    • Publishing .apps
      • Claiming Your .app Name
      • Preparing For Submission
      • Updating Metadata
        • Basic Info
        • .app Builds
          • Android
          • iOS
          • Web
        • .app Images
        • Saving On Chain
    • Launch .appStore
      • Claiming Your .appStore Name
      • Metadata Update
        • Basic Information
        • .appStore Images
        • Assign a .dev Profile
        • Publish
        • .appStore Context
      • .appStore Implementation
        • Reference Implementations
          • Android
          • web (vanilla)
          • web (featured)
          • iOS
        • Custom Implementation
          • User Identity
          • appStore Context
          • .app Listing
          • Search
          • Rating & Reviews
      • Deploying .appStore
    • Developer Profile
      • .dev Profile
      • Update Developer Info
      • Publish
  • 👨‍💻Developers
    • API
    • API Docs
  • 🤝Contributing
    • For Contributors
  • 🎋Apps
    • dApp Explorer
    • .appStore Explorer
    • Contractly.in
  • 🧑‍🚒Support & FAQs
    • Contact Us
Powered by GitBook
On this page
  • Keyword Search
  • Rerank
  • Filters
  • Autosuggest

Was this helpful?

  1. Using Meroku
  2. Launch .appStore
  3. .appStore Implementation
  4. Custom Implementation

Search

Let users explore your .appStore

Search has many faces. We will discuss search and it's use cases in your .appStore and how to implement them.

Keyword Search

This is the most basic search. Your users will enter a couple of keywords and the API will return responses.

curl --request GET \
     --url 'https://api.meroku.store/api/v1/dapp/search?search=nft+game' \
     --header 'Accept: application/json' \
     --header 'apikey: YOUR_API_KEY'

Rerank

Sometimes, you would want to rerank the default search API response. You can easily construct a reranking function, given the following information.

The responses are ranked in order by relevance. Each response object (.app) also has metrics like relevance score, and usage/engagement metrics in addition to standard metadata like description, screenshots, and more.

If you want to rerank such that .apps with a high rating and long descriptions are ranked above .apps with similar relevance but short descriptions, you can construct one like this:

const descScore = (app) => {
    const len = app.desc.length
    switch (len) {
        case len < LOW_THRESHOLD: return 1;
        case len < MED_THRESHOLD: return 2;
        case len > HIGH_THRESHOLD: return 3;
    }
}

const newScore = (app) => {
    return app.relevance + log(app.metrics.downloads) + descScore(app.desc);
}

const rerank = (appA, appB) => {
    const scoreA = newScore(appA);
    const scoreB = newScore(appB);
    if (scoreA > scoreB) {
        return 1;
    } else if (scoreA === scoreB) {
        return 0;
    }
    return -1;
}

Filters

Autosuggest

Previous.app ListingNextRating & Reviews

Last updated 1 year ago

Was this helpful?

There are various filter options available in search API. They are documented in the Search API docs at:

Who doesn't love suggestions when you start typing? There's an API for that. You can perform autosuggest using the AutoComplete API documented at

💁
https://docs.meroku.store/#/operations/searchDapps
https://docs.meroku.store/#/paths/api-v1-dapp-autocomplete/get