How to find records that DO NOT have an specific attribute

Hello everyone,

as we know an Algolia record is a set of key-value-pairs called attributes. And those attributes do not need to respect a schema and can change from one object to another.

I am now in the situation that one index that I have to work with contains records with an “attribute_a” and records that do not have this attribute at all.

I know how to browse and filter for a specific expression in “attribute_a”. But how am I able to query for the absence of this attribute. Like “give me all records that do not have this attribute”?

Thanks, Chris

Hi @christoph.schnaedter, Unfortunately, that is not possible. There are workarounds for it but they arent simple ones. You can find more details here. Filter By Null or Missing Attributes | How to | Managing Results | Guide | Algolia Documentation

1 Like

Thank you, your link was very helpful!