Excluding record from searching by field value

Hello everyone! I am new in the Algolia system. There are a few records in my index. Each record has boolean field “isActive”. How can I execlude all the records from the searching if a record has “isActive”: false, otherwise the record should be searchable?

Hi @dzerkal.r, and welcome!

When you configured your index, make sure you set isActive is set as a “Filter only” facet. You can then add this filter into your queries on the front end.

For instance, here’s how you’d do it with the JavaScript client:

index.search('query', {
  filters: 'NOT isActive:false'
}).then({ hits } => {

You can read more about filtering here: