[ https://issues.apache.org/jira/browse/LUCENE-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176689#comment-14176689 ]
Michael McCandless commented on LUCENE-1252: -------------------------------------------- +1 to this plan. Except if possible, I think "high cost filters" really should be first class in Lucene? I think the "two-phase execution" is in fact the same problem? I.e., a PhraseQuery should just rewrite itself into a conjunction of two clauses: the "pure conjunction" of the terms, which is fast to execute, AND'd with a high-cost filter (that loads positions and checks that the terms are actually a phrase). If BQ knew how to juggle such costly clauses then this issue (AND'ing a PhraseQuery with other simple clauses) and other example like geo filtering (which could rewrite into a cheap bbox AND'd w/ slow true distance check) should work well. But if somehow making high cost filters first class is too much, then I agree: let's punt, here. It just seems to me that it's the same issue as two-phase execution... > Avoid using positions when not all required terms are present > ------------------------------------------------------------- > > Key: LUCENE-1252 > URL: https://issues.apache.org/jira/browse/LUCENE-1252 > Project: Lucene - Core > Issue Type: Wish > Components: core/search > Reporter: Paul Elschot > Priority: Minor > Labels: gsoc2014 > > In the Scorers of queries with (lots of) Phrases and/or (nested) Spans, > currently next() and skipTo() will use position information even when other > parts of the query cannot match because some required terms are not present. > This could be avoided by adding some methods to Scorer that relax the > postcondition of next() and skipTo() to something like "all required terms > are present, but no position info was checked yet", and implementing these > methods for Scorers that do conjunctions: BooleanScorer, PhraseScorer, and > SpanScorer/NearSpans. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org