Closed prasad83 closed 6 years ago
The way that tokens are stored in lunr.TokenSet
should allow good performance for prefix searches already. Do you have an example where this approach works better than just using a trailing wildcard suffix?
You could certainly implement this kind of approach as a pipeline function without having to replace the tokeniser.
Because of that I don't think this change should be part of lunr, though I encourage you to package it as a separate module/plugin.
Powerup auto-completion or suggest with all-prefix tokenization.
Example:
Usage: