[jira] [Commented] (LUCENE-8490) Separate scoring features from Queries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (LUCENE-8490) Separate scoring features from Queries

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LUCENE-8490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16614918#comment-16614918 ]

Adrien Grand commented on LUCENE-8490:

One thing that annoys me a bit with the patch is that you need a query to create a weight out of a feature, which feels unnecessary.

bq. Shouldn't LongPoint.newDistanceFeatureQuery and the methods you refer to in FeatureField return a DoubleValuesSource that can then easily be incorporated into another Query?

Unfortunately it defeats the main benefit of these features today which is that they implement setMinCompetitiveScore/advanceShallow/getMaxScore, allowing block-max logic to efficiently select top matches without visiting all matches.

> Separate scoring features from Queries
> --------------------------------------
>                 Key: LUCENE-8490
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8490
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Major
>         Attachments: LUCENE-8490.patch
> We currently have two types of 'purely scoring' queries, produced by static methods on FeatureField and more recently on LongPoint (for distance or recency boosting).  These don't really make sense as standalone queries, and are designed to be used as supplementary SHOULD clauses in boolean queries.  I think these would be easier to use (and would prevent misuses, such as using them in FILTER or MUST clauses) if we designated them as Features instead, with a separate class hierarchy, and add a specific feature() method to BooleanQuery.Builder.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]