-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'json' query does not return expected results from 'application/json' #365
Comments
@lewisnyman Hi! Your suspicions about the tokenizer are spot on; it only splits tokens on Another thing I noticed about your example; you remove everything from the builder pipeline, but you leave the search pipeline alone - you might want to Out of curiosity, what are you trying to use lunr to accomplish? By removing all of the processing functions from the pipeline you're removing a lot of the value of what lunr provides! Or was that just for the purposes of your example? |
What @hoelzro says is spot on. You can customise what is considered a separator by overriding the lunr(function () {
this.tokenizer = myCustomTokenizer
}) |
Thanks for the advice. I've update the codepen now with the fix: https://jsfiddle.net/f3sbrtq2/37/ @hoelzro I was removing all of the default processing just to prove that nothing unexpected was affecting the query string. In my real world use case I've only replaced the stop word filter. Thanks for the searchPipeline tip, I completely missed that I need to remove it twice in the docs and examples. |
What is blocking you from upgrading to Lunr 2.x? |
We're using middleman-search which helpfully prebuilds the index but is not actively maintained manastech/middleman-search#29 |
Hi 👋 I'm a bit stumped by the behaviour I'm seeing in this implementation. For some reason the term
json
doesn't return pages with API documentation in it, butapplication/json
does. Is it related to the tokeniser?I've created a jsfiddle here with the same content and the default pipeline functions turned off: https://jsfiddle.net/f3sbrtq2/25/
The text was updated successfully, but these errors were encountered: