Will boolean filter faster than other filters?

I know in ES, boolean filters will be faster than other filters, not sure if it’s the same thing for Algolia? Do you recommend to use boolean filter over others?

For this sample data

    "name": "Apple iPhone 5s",
    "is_available": true
    "name": "Apple iPhone 7",
    "is_available": true
    "name": "Apple iPhone X",
    "is_available": false
  • Filter: is_available:true
  • Boolean Filter: is_available=1

Please advise.

Hi @hlcfan,

Welcome to the Algolia Community!

In the Algolia search engine, booleans are considered as integers so we apply a numeric filter with a value equal to 0 or 1 .

You should use: is_available=1

Let us know how this works for you!

Thanks for the prompt reply!

However I don’t see from the document that prefers is_available=1 over is_available:true. What’s the advantages of using is_available=1?