Filter to ignore specific records based on objectID


I was wondering if there is a way to not include certain records based on objectIDs. For example, I have a list (Index) of Users and I want to not include the current user in results.

Thanks in advance!


Hi Nate,

the objectID is a very specific/internal attribute that you cannot really use for filtering on the server side.
What you could do is duplicate the value in e.g. an id attribute and add this id as an attribute for faceting. You would then be able to filter using -id: #{object_id}.

You may find more details in How do you filter Algolia Results and omit a specific objectID - Stack Overflow (this is still the best solution for this today).

Hey Marc,

Yep, that works, thanks!