Closed coliff closed 7 years ago
This is caused by what lunr considers to be a separator, by default an underscore is not considered a separator.
This is easy to change, as described in this fiddle.
I'm not at all familiar with that mkdocs theme, so I'm not sure how you would make these changes in that context, perhaps open an issue on that project?
Thanks so much for taking the time to reply with the explaination and code example. I'm not really much of a JavaScript coder but I dug in to the JavaScript code for the MkDocs theme and replaced:
tokenizer.separator=/[\s\-]
with tokenizer.separator=/[\s\-\_]
and it worked! 👍
Nice, glad its working for you!
My documents include many class names such
Msg_IDT_ZOOM
Msg
I get results ✔️Msg_IDT_
I get results ✔️IDT
I get no results ❌ZOOM
I get no results ❌I'd like users to be able to search for
IDT
andZOOM
so that it showsMsg_IDT_ZOOM
in the results - how can I do this? I'm using Lunr.js through the mkdocs-material theme (http://squidfunk.github.io/mkdocs-material/)