lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Nenov (JIRA)" <>
Subject [jira] Updated: (LUCENE-38) RangeQuery without lower term and inclusive=false skips blank fields
Date Mon, 28 Aug 2006 07:12:26 GMT
     [ ]

Dejan Nenov updated LUCENE-38:

    Attachment: TestRangeQuery.patch

Added additional tests, using "null" as the lower term in the range query. The tests are commented
to indicate how they should be modified to behave once this LUCENE-38 is fixed. 

> RangeQuery without lower term and inclusive=false skips blank fields
> --------------------------------------------------------------------
>                 Key: LUCENE-38
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: unspecified
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Otis Gospodnetic
>         Assigned To: Lucene Developers
>         Attachments: TestRangeQuery.patch
> This was reported by "James Ricci" <> at:
> When you create a ranged query and omit the lower term, my expectation 
> would be that I would find everything less than the upper term. Now if I pass
> false for the inclusive term, then I would expect that I would find all
> terms less than the upper term excluding the upper term itself.
> What is happening in the case of lower_term=null, upper_term=x,
> inclusive=false is that empty strings are being excluded because 
> inclusive is set false, and the implementation of RangedQuery creates a default 
> lower term of Term(fieldName, ""). Since it's not inclusive, it excludes "". 
> This isn't what I intended, and I don't think it's what most people would 
> imagine RangedQuery would do in the case I've mentioned.
> I equate lower=null, upper=x, inclusive=false to Field < x. lower=null,
> upper=x, inclusive=true would be Field <= x. In both cases, the only
> difference should be whether or not Field = x is true for the query.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message