Skip to content
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

Cannot find ROLLS-ROYCE by *rolls* #527

Open
klebann opened this issue Jun 7, 2023 · 2 comments
Open

Cannot find ROLLS-ROYCE by *rolls* #527

klebann opened this issue Jun 7, 2023 · 2 comments

Comments

@klebann
Copy link

klebann commented Jun 7, 2023

Search term: *roll*:

image

Search term: *rolls*:

image

Data (search by name):
{
"id": 3681,
"name": "TROLLER",
"url": "/tecdoc/engine/list/3681"
}
{
"id": 705,
"name": "ROLLS-ROYCE",
"url": "/tecdoc/engine/list/705"
}

Is it normal behaviour? Why it can search for *roll* but not for *rolls* ?

@MeaningOfLights
Copy link

I'm having a similar issue, I can't search names with a space or hyphenated. Can you please allow "Rolls*Royce" to work? Ideally we should be able to do "Rolls Royce" and do an exact phrase search with the enclosed quotes. Its a massive limitation single word searches.

@michael-aka-mmh
Copy link

In

lunr.tokenizer.separator = /[\s\-]+/
one can see that the tokenizer uses any whitespace or dash character to separate words. You could try to change the regular expression to whitespace characters only.

Exact phrase search is on my wish list, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants