How does [hidden] work if filters do not have a "contains" ability?

Hi there!

I’m neck deep in our own implementation of an Algolia implementation and I’m wanting to implement the ability to ignore results. I know that in the app implementation the algolia-ignore tag is available as well as the [hidden] keyword(?).

I figure I can implement a metafield that allows for hiding collections and pages since they don’t allow for tags, and [hidden] is kind of awkward.

However, we have some collections that have naming conventions where it would be nice for them to be hidden purely off another “keyword”. For example, a collection ending in " Related". However, according to other Q&As, filters don’t have “contains” functionality.

If this is the case, how does [hidden] work? Is it hardcoded or is there a way to replicate it? At least on the surface it feels like a contains ability. Maybe it isn’t using filters?

Hello Veronica!

I’m Tom from shopify Team at Algolia.
Thanks for reaching us. That’s a relevant question.

If this is the case, how does [hidden] work? Is it hardcoded, or is there a way to replicate it? At least on the surface, it feels like a contains ability. Maybe it isn’t using filters?

Indeed, we don’t use filters to hide records with ‘[hidden’] in the title.
While fetching processing Shopify resources, we simply ignore those products, collections, pages and blog posts which contains ‘[hidden]’ in the title. This ensures that data is not indexed within Algolia and is impossible to retrieve within search results.
There is no way to reproduce it because it is indeed hard coded.

Feel free to reach us if you have any others questions regarding our application.

Best regards,

1 Like