Add ability to change lunr tokenizer
See original GitHub issueIn order to make search more powerful, adding the ability to change the lunr.tokenizer.seperator
would be nice.
https://github.com/olivernn/lunr.js/blob/master/lib/tokenizer.js#L69-L76
Out of the box, if you have the string:
this.test
The query test
will return empty, but this.t
will return this.test
.
By changing the regex used for tokenization, you could solve problems like this
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Examples how to customize lunr #230 - GitHub
Hi, Maybe it's dumb question but I couldn't realize how to add custom tokenizer to lunr, is it possible? Where can I find...
Read more >JSDoc: Source: tokenizer.js - Lunr.js
Uses `lunr.tokenizer.separator` to split strings, change; * the value of this property to change how strings are split into tokens.
Read more >lunr.js - RDoc Documentation
Uses `lunr.tokenizer.separator` to split strings, change * the value of this property to change how strings are split into tokens. * * This...
Read more >lunr.py
Lunr is a simple full text search solution for situations where deploying a full scale solution like Elasticsearch isn't.
Read more >lunr-mutable-indexes - npm
Mutable indexes work by having a handle to their original builder - this inflates the index size a bit. · Changing a builder's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, yes that could be nice. But I agree, would probably want to iron that out a bit more before it is introduced into the API interface.
Yes I think this could be the best starting point. Just having access to the lunr object via
itemsjs
would be the most flexible for advanced users and will ensure the correct dependencySomething like this:
or
@saminzadeh I’ve introduced simple full text integration with all external search engines in the latest version. You can see here -> https://github.com/itemsapi/itemsjs/blob/master/docs/lunr2-integration.md or in Readme