Skip to content

Public scorer#1448

Open
pavelbazika wants to merge 2 commits intoblevesearch:masterfrom
pavelbazika:public-scorer
Open

Public scorer#1448
pavelbazika wants to merge 2 commits intoblevesearch:masterfrom
pavelbazika:public-scorer

Conversation

@pavelbazika
Copy link
Copy Markdown
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