[
https://issues.apache.org/jira/browse/LUCENE-8197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16392146#comment-16392146
]
Robert Muir commented on LUCENE-8197:
-------------------------------------
Looks much better, a few more notes on the javadocs:
* Some of the documented ranges appear as {{[1, +Infty[}}. I think the ending
bracket is a typo? Also should we say +Inf or +Infinity just to make it clear?
I think the former is consistent with java but the latter is definitely
explicit. I think the abbreviated form Infty is to be avoided.
* For the arguments {{w}} and {{a}}, I think we should have {{@param}} javadocs
for these? They could explain for example that {{w}} is the "feature
importance" like IDF and that {{a}} is the scaling factor for frequency values?
* Maybe consider the parameter names here. I'm not sure they are as
well-known/ubiquitous as bm25 k1/b parameters. For example in the log case they
could be {{weight}} and {{scale}}... I could go either way on this though.
In general just thinking little tweaks can go a long way for users here. Love
that the api is minimal and everything is in one place.
> Make top-k queries fast when static scoring signals are incorporated into the
> score
> -----------------------------------------------------------------------------------
>
> Key: LUCENE-8197
> URL: https://issues.apache.org/jira/browse/LUCENE-8197
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Priority: Minor
> Fix For: master (8.0)
>
> Attachments: LUCENE-8197.patch, LUCENE-8197.patch
>
>
> Block-max WAND (LUCENE-8135) and some earlier issues made Lucene faster at
> computing the top-k matches of boolean queries.
> It is quite frequent that users want to improve ranking and end up scoring
> with a formula that could look like {{bm25_score + w * log(alpha +
> pagerank)}} (w and alpha being constants, and pagerank being a per-document
> field value). You could do this with doc values and {{FunctionScoreQuery}}
> but unfortunately this will remove the ability to optimize top-k queries
> since the scoring formula becomes opaque to Lucene.
> I'd like to add a new field that allows to store such scoring signals as term
> frequencies, and new queries that could produce {{log(alpha + pagerank)}} as
> a score. Then implementing the above formula can be done by boosting this
> query with a boost equal to {{w}} and adding this boosted query as a SHOULD
> clause of a {{BooleanQuery}}. This would give Lucene the ability to compute
> top-k hits faster, especially but not only if the index is sorted by
> decreasing pagerank.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]