Special characters like curly braces are ignored during search?

Contao uses curly braces for so called “insert tags” (similar to WordPress’ shortcodes), which look like this for example: {{foobar::*}}. The manual documents these insert tags. However, when you actually search for an insert tag via Docsearch, the curly braces seem to be ignored. For example, if you go to https://docs.contao.org/manual/de/ and search for {{date, only results with the word (or partial word) date come up - even though the result should only show the very specific {{date}} insert tag. Or if you search for {{insert_content::*}} the search result only highlight insert and content, but seem to ignore everything else.

Searching for a specific insert tag would be important for us. Is there a way to make Algolia Docsearch not ignore these special characters?


Thank you for your question.

I believe you can go around this problem by adding curly brackets to separatorToIndex see here in Docsearch and here for Algolia documentation.

I hope that helps.

1 Like