-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Score exact matches higher over location #78
Comments
I've attached a test case that runs with Node.js and has some example data attached to it. Running queries for it for the terms "egg" should illustrate what I mean. Granted if you do search "eggs" it puts more relevant results to the top, but it still gives a lower score towards items with "egg" because of location over partial matches. The data might be a bit weird, but it's from actual production data I'm working with which I have extracted here for demonstration purposes. |
Thanks for test cases, I will take a look! |
Not sure if this is more related to #77 , but if for example you change data to:
For query: "egg" Sorry for not being much help other than raising issues, I'm still working on understanding the algorithm. |
I was experiencing the same issue and reverted back to 1.3.1 |
From what I see bitapScore weights matches higher the closer to the "location" given when creating a search over exact matches.
EX: Query "egg" on a list that contains: "----- leggings" and "--------- -------- eggs" would rank the "leggings" higher than the "eggs" item because the "location: 0". Due to the nature of my items I can't guarantee where the keywords would be in the object names, even as an approximation.
Any thoughts into how I would modify the current bitap scoring to ignore/minimize the effect of location scoring over matches (is this even possible, I might be misunderstanding the whole algorithm).
One other way I can see would be to possibly randomize of keywords in my items/split them at " ", however this would cause bigram matches (ex: "chocolate milk") to rank lower.
The text was updated successfully, but these errors were encountered: