You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2020/01/03 22:30:01 UTC
[jira] [Commented] (SOLR-14164) Replace Solr's FunctionRangeQuery
with Lucene's
[ https://issues.apache.org/jira/browse/SOLR-14164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007802#comment-17007802 ]
David Smiley commented on SOLR-14164:
-------------------------------------
Note that this retains the default Solr extended query cost=100 that this query uses -- see SOLR-11641. This makes the query perform like a "post filter" if the user explicitly specifies cache=false as well. A difference here is that I did this at the query parser level whereas previously it was at the query itself. Unfortunately, this means that in rare-ish cases, range queries produced by NumericFieldType no longer have this characteristic because NFT uses Lucene's FunctionRangeQuery bypassing the frange QParser. It's rather strange to see NFT using this class; it only occurs when the min of the range is negative and the max of the range is positive. It's hard to tell but maybe SOLR-10011 (CC [~ichattopadhyaya]) added or if not then maybe near before then. Any idea Ishan?
> Replace Solr's FunctionRangeQuery with Lucene's
> -----------------------------------------------
>
> Key: SOLR-14164
> URL: https://issues.apache.org/jira/browse/SOLR-14164
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Solr has a FunctionRangeQuery. It is constant scoring and also a post-filter. Lucene has a FunctionRangeQuery that I added years ago LUCENE-6919. It is not constant scoring as it scores based on the wrapped ValueSource, although this is easily made the same as Solr's by wrapping in a ConstantScoreQuery. And it uses Lucene's TwoPhaseIterator indirectly which is equivalent functionality to Solr's PostFilter. Consequently we can remove Solr's implementation. Additionally, ValueSourceRangeFilter is a piece of the puzzle that can be removed as Solr's FunctionQuery was a wrapper around this specifically. FYI Once upon a time, Query and Filter were separate, then Filter was made to subclass Query and then Filter was relegated to Solr as tech debt.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org