Re: Lucene 3.6.2 deleteDocument(docNum) and undeleteAll

2013-05-24 Thread Daniel Penning
The changes made by a IndexWriter since the last commit() will be undone if you close it with IndexWriter#rollback(). Afaik using IndexReader#undeleteAll to undo previously done deletes is a very bad way as it will not only undelete the documents deleted by the current IndexReader but all dele

lucene 4.0.0

2013-05-24 Thread mary meriem
hii am mary and i have a problem with lucene, Actually a work with lucene 4.0.0, my problem is, how can I more listed all the terms, the display position for each term in each document and their frequency?please help

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

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 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 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, > > I've been out of the loo

Re: lucene 4.0.0

2013-05-24 Thread Brendan Grainger
According to: http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/IndexReader.html#leaves()it is. On Fri, May 24, 2013 at 6:49 PM, mary meriem wrote: > > > I have a problem with AtomicReader reader = > indexReader.leaves().get(0).reader(); it is topical in Lucene 4.0.0?? > > > Dat

PrefixQuery with short prefix does not match documents

2013-05-24 Thread Steven Schlansker
Hi everyone, I am building an autocomplete index. The index contains both the names and a small set of fixed types. The intention is that type matches will always come first, followed by name matches. I am using a PrefixQuery to do substring matching. Confusingly, I am finding that very shor

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. > > > On Fri, May 24, 201