Re: Why is the old value still in the index

2011-12-16 Thread Paul Taylor
On 16/12/2011 22:51, Rene Hackl-Sommer wrote: Maybe you could just use MatchAllDocsQuery? http://lucene.apache.org/java/3_5_0/api/core/org/apache/lucene/search/MatchAllDocsQuery.html Rene Ah thanks Rene, thats what I wanted Paul

Re: Why is the old value still in the index

2011-12-16 Thread Rene Hackl-Sommer
Maybe you could just use MatchAllDocsQuery? http://lucene.apache.org/java/3_5_0/api/core/org/apache/lucene/search/MatchAllDocsQuery.html Rene Am 16.12.2011 22:58, schrieb Paul Taylor: On 16/12/2011 20:54, Paul Taylor wrote: Thanks I think you might have it, but tell me if forceMergeDelete

Re: Why is the old value still in the index

2011-12-16 Thread Paul Taylor
On 16/12/2011 20:54, Paul Taylor wrote: On 16/12/2011 17:43, Uwe Schindler wrote: Hi, I'm adding documents to an index, at a later date I modify a document and update the index, close the writer and open a new IndexReader. My indexreader iterates over terms for that field and docFreq() returns

Re: Why is the old value still in the index

2011-12-16 Thread Paul Taylor
On 16/12/2011 17:43, Uwe Schindler wrote: Hi, I'm adding documents to an index, at a later date I modify a document and update the index, close the writer and open a new IndexReader. My indexreader iterates over terms for that field and docFreq() returns one as I would expect, however the iter

RE: Why is the old value still in the index

2011-12-16 Thread Austin, Carl
ocs if you need to. -Original Message- From: Paul Taylor [mailto:paul_t...@fastmail.fm] Sent: 16 December 2011 17:20 To: Ian Lea Cc: java-user@lucene.apache.org Subject: Re: Why is the old value still in the index On 16/12/2011 17:10, Ian Lea wrote: > Shouldn't > > iw.update

RE: Why is the old value still in the index

2011-12-16 Thread Uwe Schindler
Hi, > I'm adding documents to an index, at a later date I modify a document and > update the index, close the writer and open a new IndexReader. My > indexreader iterates over terms for that field and docFreq() returns one as I > would expect, however the iterator returns both the old value of the

Re: Why is the old value still in the index

2011-12-16 Thread Paul Taylor
On 16/12/2011 17:10, Ian Lea wrote: Shouldn't iw.updateDocument(new Term(FIELD1,"term1"),document); be iw.updateDocument(new Term(FIELD1,"test"),document); if you want to replace the first doc? Hmm, you are right if I change it I then get TermDocsFreq1 test TermDocsFreq1 test2 (but doesn

Re: Why is the old value still in the index

2011-12-16 Thread Ian Lea
Shouldn't iw.updateDocument(new Term(FIELD1,"term1"),document); be iw.updateDocument(new Term(FIELD1,"test"),document); if you want to replace the first doc? -- Ian. On Fri, Dec 16, 2011 at 4:54 PM, Paul Taylor wrote: > I'm adding documents to an index, at a later date I modify a document a