lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-2669) NumericRangeQuery.NumericRangeTermsEnum sometimes seeks backwards
Date Sun, 26 Sep 2010 18:00:43 GMT

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

Michael McCandless updated LUCENE-2669:
---------------------------------------

    Attachment: LUCENE-2669.patch

Patch w/ 2 asserts.  NRQ only trips up on the first (FilteredTermsEnum) assert.  That it doesn't
trip the 2nd shows that indeed its seek ranges are properly sorted...

> NumericRangeQuery.NumericRangeTermsEnum sometimes seeks backwards
> -----------------------------------------------------------------
>
>                 Key: LUCENE-2669
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2669
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Michael McCandless
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2669.patch
>
>
> Subclasses of FilteredTermsEnum are "supposed to" seek forwards only (this gives better
performance, typically).
> However, we don't check for this, so I added an assert to do that (while digging into
testing the SimpleText codec) and NumericRangeQuery trips the assert!
> Other MTQs seem not to trip it.
> I think I know what's happening -- say NRQ has term ranges a-c, e-f to seek to, but then
while it's .next()'ing through the first range, the first term after c is f.  At this point
NRQ sees the range a-c is done, and then tries to seek to term e which is before f.  Maybe
NRQ's accept method should detect this case (where you've accidentally .next()'d into or possibly
beyond the next one or more seek ranges)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message