Hidden search results with InstantSearch

Hello,

I have a specific use case and I don’t know which way to go to achieve it with Algolia.

We have a real estate agency using InstantSearch to browse through our portfolio of properties. Some properties, however, are “off-market”, meaning we don’t want them to be browsed, except for agents who need a “hidden” way to find them.

Security isn’t really an issue here (i.e. if a user finds out about the secret back door, it’s fine).

What would be the best way to achieve this? Is it possible to display a search result only if there’s an exact match on an attribute for example?

Thank you,
Nicolas

Hi @ikeys-realty, there are several ways you could implement this. You could restrict the results to specific users. Another way would be to filter the results based on an attribute for ‘hidden’ (or any attribute that will indicate this is an off-market property. You could use this filter on a different page for your agents who should have access and only provide the link to that page to those agents. On your public pages you could filter out the hidden properties.

For example, if you have an attribute ‘hidden’ that is true for the off-market properties, and false for those that are not off-market, you could filter for hidden:false when getting results for your public page. You could use no filter at all if you want to show all properties to your agents that can see the off-market products, or if you only want them to see the hidden properties on that page, you could use the hidden:true filter.