You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2015/04/14 19:25:13 UTC

[jira] [Updated] (LUCENE-6419) Add AssertingQuery / two-phase iteration to AssertingScorer

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

Adrien Grand updated LUCENE-6419:
---------------------------------
    Attachment: LUCENE-6419.patch

Here is a patch. It removes some unused code from AssertingScorer and adds assertions to two-phase iteration:
 - matches() must be called at most once
 - the approximation and the scorer must advance synchronously
 - score() and freq() cannot be called if matches() has not be called too

> Add AssertingQuery / two-phase iteration to AssertingScorer
> -----------------------------------------------------------
>
>                 Key: LUCENE-6419
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6419
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Robert Muir
>         Attachments: LUCENE-6419.patch
>
>
> I am working on a similar issue with Spans (LUCENE-6411).
> AssertingScorer is currently only used as a top-level wrapper, and it doesnt support asserting for asTwoPhaseIterator (wouldn't help at the moment, the way it is currently used).
> Today some good testing of this is done, but only when RandomApproximationQuery is explicitly used.
> I think we should add AssertingQuery that can wrap a query with asserts and we can then have checks everywhere in a complicated tree?



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org