skip icon indicating copy to clipboard operation
skip copied to clipboard

Documentation search can't search for keywords containing underscores

Open dfabulich opened this issue 2 months ago • 5 comments

Go to https://skip.tools/docs/ and try to search for SKIP_BRIDGE.

Expected: SKIP_BRIDGE is documented on https://skip.tools/docs/modes/ and that should be the first result.

Actual: Algolia search ignores the underscore, and treats it as a search for "skip bridge", which includes four results, none of which are https://skip.tools/docs/modes/

It's similarly broken for SKIP_ACTION, SKIP_ZERO.

dfabulich avatar Oct 08 '25 19:10 dfabulich

You can't search for #available either.

dfabulich avatar Oct 15 '25 16:10 dfabulich

https://samypesse.gitbook.io/algolia-faq/searching/how-can-i-search-for-punctuation-special-characters

How can I search for punctuation/special characters?

By default, we do not take punctuation into account when doing a search (we consider any punctuation character to be equivalent to a 'space').

If you would like to enable special characters in your search (for example for being able to search for the string C++), you'll have to edit the separatorsToIndex field on your index settings. In the previous example, you'll just have to add the character + for being able to search for it.

I suggest adding at least these: _ - + @ #

dfabulich avatar Oct 15 '25 16:10 dfabulich

Thanks for doing the research! I didn't realize that was a configurable option.

I've updated our search index to handle _ - + @ #. I expect it will take some time for Algolia to re-index, so I'll keep this issue open until we've confirmed that it is working as expected.

Image

marcprux avatar Oct 15 '25 16:10 marcprux

It seems like it's already mostly working, but for some reason SKIP_ZERO isn't showing up in searches. (It appears only on https://skip.tools/docs/skip-cli/ AFAIK.)

dfabulich avatar Oct 15 '25 19:10 dfabulich

Ohh, I think I see the problem: it's not searching in any code blocks. So, for example, you can't search for INFOPLIST_KEY_CFBundleDisplayName which appears in https://skip.tools/docs/faq/#appname

You also can't search for Material3BottomAppBarOptions which appears in https://skip.tools/docs/modules/skip-ui/#material-components

I bet that's a setting in the Algolia UI, too.

dfabulich avatar Oct 15 '25 22:10 dfabulich