[ 
https://issues.apache.org/jira/browse/LUCENE-6394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir updated LUCENE-6394:
--------------------------------
    Attachment: LUCENE-6394.patch

Updated patch. its a little better, when the 'exclude' part has an 
approximation, we will use it.

I need to refactor the logic again though, currently it uses a hack which is 
not great for its "advanceExact" logic:

{code}
if (excludeApproximation.advance(candidate.docID()) != candidate.docID()) {
  return AcceptStatus.YES;
} else if (!excludeTwoPhase.matches()) {
  excludeApproximation.nextDoc(); // move off this doc, we don't match.
  return AcceptStatus.YES;
}
{code}

We should just track an int or something instead, moving off the document with 
nextDoc() is not as efficient (we might never need it).

> Add two-phase support to SpanNotQuery
> -------------------------------------
>
>                 Key: LUCENE-6394
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6394
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-6394.patch, LUCENE-6394.patch
>
>
> This query is actually a lot like SpanPositionCheckQuery, except it checks 
> that each inclusion Spans does not come near the exclusion side.
> Two-phase iteration should just work the inclusion side, deferring positions 
> (the overlap checking against exclusion) until necessary.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to