lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: lucene 4.0.0 range query broken?
Date Wed, 16 Jul 2014 09:45:52 GMT
If you index as a long field, you have to use NumericRangeQuery to query. A simple TermRangeQuery
as created by QueryParser does not work, because it cannot handle numeric fields.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Jamie [mailto:jamie@mailarchiva.com]
> Sent: Wednesday, July 16, 2014 11:43 AM
> To: java-user@lucene.apache.org
> Subject: Re: lucene 4.0.0 range query broken?
> 
> All
> 
> As a further to the below.
> 
> We are able to search by range query when the indexes are created by 3.8.1.
> When the date field is indexed by 4.0.0, search with date range query
> doesn't work.
> 
> Here's how we index the date field.
> 
> String date = DateUtil.convertDatetoString((Date)
> value,DateUtil.minuteFormatFast);
> LongField docField = new LongField(indexFieldName, Long.parseLong(date),
> store); doc.add(docField);
> 
> Any ideas?
> 
> Jamie
> 
> On 2014/07/16, 11:35 AM, Jamie wrote:
> > Hi
> >
> > This query does not work either:
> >
> > QueryWrapperFilter(+archivedate:[201407080000 TO 201407310000]
> > +cat:email)
> >
> > Thus, in our mind, Lucene 4.0.0 range query is broken. We tried to
> > downgrade to v3.8.1, but it wont read  indexes created by 4.0.0.
> >
> > Any recommendations on how to get out of this bind?
> >
> > Jamie
> >
> >
> >
> > On 2014/07/16, 11:15 AM, Jamie wrote:
> >> Hi
> >>
> >> I have a situation whereby the following filter query works with
> >> Lucene 3.8.1
> >>
> >> ChainedFilter: [QueryWrapperFilter(+receivedate:[201407010000 TO
> >> 201407310000] +cat:email)
> >> org.apache.lucene.sandbox.queries.DuplicateFilter@6a894d44 ]
> >>
> >> With Lucene 4.0.0, the query always returns zero results. It doesn't
> >> work.
> >>
> >> Is this a bug? The problem seems to occur when receivedate range
> >> query is added.
> >>
> >> Jamie
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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


Mime
View raw message