[
https://issues.apache.org/jira/browse/LUCENE-7722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15902416#comment-15902416
]
Adrien Grand commented on LUCENE-7722:
--------------------------------------
bq. Looking closer at BoostingQuery, I think the same effect could be had by
using a BooleanQuery and wrapping the 'suppressing' subquery with a
negative-valued BoostQuery? In addition, BoostingQuery has no tests that
actually run the query...
+1 I think those queries are a bit esoteric so we should not spend to much
energy or make the API more complicated just to be sure we keep supporting the
same functionality. Recommending negative-boosted queries as a replacement
sounds good to me.
bq. On reader-dependent DoubleValuesSource implementations, I think we need to
add something like a rewrite() function to make the dependancy explicit.
Otherwise you could have odd interactions with things like the QueryCache.
I'm not sure exactly how you think of that rewrite, but for the record we need
to make sure to never end up referencing IndexReader or Weight objects from
Query objects, or it could cause similar leaks to LUCENE-7657.
Since this need for per-reader specialization only exists for queries, I'm
wondering whether we could make it optional somehow. For instance maybe we
could have {{Function<IndexSearcher,DoubleValuesSource>
DoubleValuesSource.fromQuery(Query)}} and add a new constructor
{{FunctionScoreQuery(Query,Function<IndexReader,DoubleValuesSource>)}} which
would be used by values sources that need per-index-reader specialization while
simple (and common) usage of this API that only need reader-independant values
sources could keep using the current API (which I like for its simplicity)?
> Remove BoostedQuery
> -------------------
>
> Key: LUCENE-7722
> URL: https://issues.apache.org/jira/browse/LUCENE-7722
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Adrien Grand
> Priority: Minor
>
> We already have FunctionScoreQuery, which is more flexible than BoostedQuery
> as it can combine scores in arbitrary ways and only requests scores on the
> underlying scorer if they are needed. So let's remove BoostedQuery?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]