Skip to content

how to get possible indexes for SortBy? #6082

Closed Answered by srghma
srghma asked this question in Q&A
Discussion options

You must be logged in to vote

I actually found in

searchkit/searchkit#1311

const sk = new Searchkit({
  connection: {
    host: window.appElasticsearchUrl,
    // cloud_id: "my-cloud-id" // if using Elastic Cloud
    // if you're authenticating with username/password
    // https://www.searchkit.co/docs/guides/setup-elasticsearch#connecting-with-usernamepassword
    //auth: {
    //  username: "elastic",
    //  password: "changeme"
    //},
    // if you're authenticating with api key
    // https://www.searchkit.co/docs/guides/setup-elasticsearch#connecting-with-api-key
    // apiKey: "######"
  },
  search_settings: {
    sorting: {
      // default: ...
      mysort_price_asc: {field: 'price', order: 'asc'}, 
      

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by srghma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants