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

Public scorer #1448

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

pavelbazika
Copy link
Contributor

Hi,

I'd like to be able to set the scorer of disjunction query to a custom one.

The reason is, that disjunction query scorer currently divides overall score of matched Disjuncts by the number of Disjuncts. Such behavior is reasonable for boolean query, but not for my use case (I need to get max score of Disjuncts). Unfortunately, the scorer is private property of a searcher.

To make it changeable, I renamed DisjunctionScorer struct to disjunctionScorer and created an interface DisjunctionScorer instead. Then I added func SetScorer(scorer scorer.DisjunctionQueryScorer) to disjunction searchers, which I use in my app.
For consistency, I did similar changes to other scorers as well (not needed by me now).

Please see a proposal how such change could be done. I do not know the naming rules of bleve project well, no problem to change anything.

Best regards

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

Successfully merging this pull request may close these issues.

2 participants