Search for facet / attribute that is undefined



We have added a new attribute to our data, and since we have lots of records who (mostly) also get updated daily, we now have a small group that still doesn’t have the new attribute.
Is there a way to search for these objects that don’t have this attribute?

old data looks like:
object {
id : 123
title : test

new data:
object {
id : 456
title: test2
newattribute : test

So how can i search for all objects that don’t have the “newattribute” attribute?


Hi there, trying to find records that do not have a particular value can’t be done in Algolia. You need to precompute your data as much as possible for example to compute an attribute like hasNewAttribute: true/false OR set newAttribute: null when relevant.

I hope this helps, thanks


Hmm yes, this was to avoid looping over ALL records (which can be a lot) and not have to update/reindex everything, which brings a big cost also. Would love to see a filter like this in the future.