Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Sorry to suggest that it was a Lucene bug. It is rare we encounter Lucene bugs - a testament to your code quality. Much appreciate! On 2014/07/16, 12:33 PM, Jamie wrote: Uwe Thank you. I think your earlier hint regarding precision steps solved it. I noticed that new Long was created with a

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Uwe Thank you. I think your earlier hint regarding precision steps solved it. I noticed that new Long was created with a precision step of 4, but my range query was creating precision step of 8. return NumericRangeQuery.newLongRange(field.getIndexField(), 8, Long.parseLong(query.getLowerTe

RE: lucene 4.0.0 range query broken?

2014-07-16 Thread Uwe Schindler
Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Jamie [mailto:ja...@mailarchiva.com] > Sent: Wednesday, July 16, 2014 12:21 PM > To: java-user@lucene.apache.org > Subject: Re: lucene 4.0.0 ran

RE: lucene 4.0.0 range query broken?

2014-07-16 Thread Uwe Schindler
://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Jamie [mailto:ja...@mailarchiva.com] > Sent: Wednesday, July 16, 2014 12:09 PM > To: java-user@lucene.apache.org > Subject: Re: lucene 4.0.0 range query broken? > > Here it is > > return Num

RE: lucene 4.0.0 range query broken?

2014-07-16 Thread Uwe Schindler
Why do you use QueryWrapperFilter instead of using NumericRangeFilter directly? - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Jamie [mailto:ja...@mailarchiva.com] > Sent: Wednesday, July 16, 2014 11:15

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Uwe The range query works with lindexes created by 3.8.1, but not 4.0.0. To me, this indicates that Lucene 4.0.0 is not indexing these longs correctly, or something of the sort. Do you have any ideas on where to look? Jamie On 2014/07/16, 12:15 PM, Uwe Schindler wrote: Sorry, no you canno

RE: lucene 4.0.0 range query broken?

2014-07-16 Thread Uwe Schindler
rg > Subject: Re: lucene 4.0.0 range query broken? > > Uwe > > is there anyway we can downgrade to 3.8.1 while being able to read indexes > created from 4.0.0? > > On 2014/07/16, 11:45 AM, Uwe Schindler wrote: > > If you index as a long field, you have to

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Uwe is there anyway we can downgrade to 3.8.1 while being able to read indexes created from 4.0.0? On 2014/07/16, 11:45 AM, Uwe Schindler wrote: 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

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Here it is return NumericRangeQuery.newLongRange(field.getIndexField(), 8, Long.parseLong(query.getLowerTerm().utf8ToString()), Long.parseLong(query.getUpperTerm().utf8ToString()), query.includesLower(), query.includesUpper()); Range query appears broken in Lucene 4.0.0. On

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Uwe Thanks for the suggestion. When I inspect the query in Eclipse, I can clearly see that a NumericRangeQuery is constructed. Why would this query work in an older version of Lucene but not 4.0.0.? Jamie On 2014/07/16, 11:45 AM, Uwe Schindler wrote: If you index as a long field, you have

RE: lucene 4.0.0 range query broken?

2014-07-16 Thread Uwe Schindler
> -Original Message- > From: Jamie [mailto:ja...@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 q

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
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,DateUt

Re: lucene 4.0.0 range query broken?

2014-07-16 Thread Jamie
Hi This query does not work either: QueryWrapperFilter(+archivedate:[20140708 TO 20140731] +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 bin

RE: lucene 4.0.0

2013-05-24 Thread mary meriem
yes thank you > Date: Fri, 24 May 2013 18:59:13 -0400 > Subject: Re: lucene 4.0.0 > From: brendan.grain...@gmail.com > To: java-user@lucene.apache.org > > According to: > http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/IndexReader.html#leaves()it > is

Re: lucene 4.0.0

2013-05-24 Thread Brendan Grainger
Lucene 4.0.0?? > > > Date: Fri, 24 May 2013 13:41:05 -0400 > > Subject: Re: lucene 4.0.0 > > From: brendan.grain...@gmail.com > > To: java-user@lucene.apache.org > > > > Hi Mary, > > > > I've been out of the loop with Lucene and java for a bit so this is

RE: lucene 4.0.0

2013-05-24 Thread mary meriem
I have a problem with AtomicReader reader = indexReader.leaves().get(0).reader(); it is topical in Lucene 4.0.0?? > Date: Fri, 24 May 2013 13:41:05 -0400 > Subject: Re: lucene 4.0.0 > From: brendan.grain...@gmail.com > To: java-user@lucene.apache.org > > Hi Mary, > &

RE: lucene 4.0.0

2013-05-24 Thread mary meriem
I'll try to see how inculre with my code, thank you very much.

Re: lucene 4.0.0

2013-05-24 Thread Brendan Grainger
Hi Mary, I've been out of the loop with Lucene and java for a bit so this is might not be too correct, but here is an example of how it might be accomplished (also you can see it in this gist: https://gist.github.com/rainkinz/5645139). The output looks like this: ** Also note I'm using Lucene 4.3

Re: lucene 4.0.0

2013-05-24 Thread Michael McCandless
Use TermsEnum to iterate through all terms, and DocsAndPositionsEnum to visit all docs containing each term, and its frequency and all positions of each term occurrence within the document. Also, try to upgrade from 4.0.0 to the latest (4.3.0) ... Mike McCandless http://blog.mikemccandless.com

Re: Lucene 4.0.0 - find term position.

2012-12-07 Thread Adrien Grand
Hi Vitaly, On Fri, Dec 7, 2012 at 3:24 PM, wrote: > I try to use or Terms tfvector = reader.getTermVector(docId, "contents"); > or Fields fields = reader.getTermVectors(docId); > but I get null from these calls. > What is wrong? These methods will always return null unless you turn term vect

RE: Lucene 4.0.0 - find term position.

2012-12-07 Thread Vitaly_Artemov
java-user@lucene.apache.org Subject: Re: Lucene 4.0.0 - find term position. terms = fileds.terms(...); termsEnum = terms.iterator(null); termsEnum.seekExat(...); docsAndPositionsEnum docsPosEnum = termsEnum.docsAndPositions(...); You can get the information in "docsPosEnum". On Thu, De

Re: Lucene 4.0.0 - find term position.

2012-12-06 Thread lukai
terms = fileds.terms(...); termsEnum = terms.iterator(null); termsEnum.seekExat(...); docsAndPositionsEnum docsPosEnum = termsEnum.docsAndPositions(...); You can get the information in "docsPosEnum". On Thu, Dec 6, 2012 at 2:28 AM, wrote: > Hi all, > I am new with Lucene. > I try to understand