This Confluence instance is now read-only, please head over to the Algolia Confluence instance for the same more up-to-date information

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

These instructions apply only to the Search UI Widgets. Find documentation for other integration methods here: https://docs.search.io/developer-documentation/fundamentals/api-and-client-libraries

By default search results are returned in the order we deem to be the most relevant to the search query.

However, you may wish to override this behaviour. In order to do so, you can add a simple single line of code to your Search Widgets that will order the results the way you desire.

To do so add the following line to the variables object in your Search Results Widget:

  "variables": {
      "sort": "price"
   },

This will sort on the price field, ordering results from low to high. To order from high to low simply change to the following:

  "variables": {
      "sort": "-price"
   },

  • No labels