We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the query tas lunr matches on ta rather than the full word.
tas
ta
The text was updated successfully, but these errors were encountered:
This is expected behaviour as tas is stemmed to ta, both on index building time and when searching.
To disable the stemmer you'll need to disable it from both the indexing pipeline and the search results pipeline, something like:
from lunr import get_default_builder from lunr.stemmer import stemmer docs = [ { "id": 1, "text": "rax tas ras", }, { "id": 2, "text": "rex tas res", }, ] builder = get_default_builder() builder.ref("id") builder.field("text") builder.pipeline.remove(stemmer) builder.search_pipeline.remove(stemmer) for doc in docs: builder.add(doc) idx = builder.build() results = idx.search("tas") assert len(results) == 2
Sorry, something went wrong.
No branches or pull requests
When using the query
tas
lunr matches onta
rather than the full word.The text was updated successfully, but these errors were encountered: