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

Interaction of weighting and phrasal search #290

Open
martindholmes opened this issue Mar 8, 2024 · 1 comment
Open

Interaction of weighting and phrasal search #290

martindholmes opened this issue Mar 8, 2024 · 1 comment
Assignees
Labels
question Further information is requested
Milestone

Comments

@martindholmes
Copy link
Collaborator

This is not necessarily a bug or an FR, more a prompt for us to discuss and decide on a policy regarding the interaction of weighting and phrasal searching.

If you search for a single word, e.g. "wholesale", without quotation marks, and you get a hit which is in a weighted context, the hit will score based on the weighting (now that the weighting bug has been fixed). However, if you search for the phrase "Wholesale dealers" and get a hit in exactly the same context, the score the hit gets will not take account of the context weighting. This may perhaps be fine; when you do phrasal searching, you're typically seeking something very specific and the number of hit documents is expected to be very low anyway, so weighting is less important.

On the other hand, if you're searching for a phrase which occurs in many places, you might well want to benefit from weighting to bring hits in significant contexts to the top of the list.

On line 1674 of StaticSearch.js, we appear to assign a standard weight of 2 to any phrasal hit. However, we could take the weight directly from the context at that point. Or we could take the greater of the two, to ensure that phrases still get higher than the default weighting. Thoughts?

@martindholmes martindholmes added the question Further information is requested label Mar 8, 2024
@martindholmes martindholmes added this to the Release 2.0 milestone Mar 8, 2024
@martindholmes
Copy link
Collaborator Author

Branch weight_context_fix is dealing with this and a related problem with weighting.

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

No branches or pull requests

2 participants