Price (Numeric value) is not setting in facet Meilisearch

387 Views Asked by At

I have rangeInput field, which has Min and Max input, where user can add price to search, I have below code for price search.

customRangeInput({
  container: document.querySelector('#range-input'),
  attribute: 'price',
  }),

and I am adding as facet like below:

 curl \
  -X POST 'https://search.example.com/indexes/maps/settings' \
  --data '{
      "searchableAttributes": [ "price" ]
  }' -H "X-Meili-API-Key: xxxxxx"

but it says Price is not set as facet. can we not se numeric value in facet? (Attribute price is not set as facet) any help would be great.

Thanks Sanjay

1

There are 1 best solutions below

7
On

In the current version of MeiliSearch you can perform faceting on attributes that are either String or [String]. The whole core team is currently working on a new search engine that will be released with v0.21.0 and will accept numeric values too :)