Hello! Ehem, I have to apologize. It was my stupidity that caused this problem. I simply mixed up field names... I did the deletion of items in a superclass, which of course didn't know about the change in the uri field name. Duh! Everything works now, just like it should.
Sorry again! Thanks for bearing with me though! max -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 03:37 To: java-user@lucene.apache.org Subject: Re: deleting on a keyword field On Jun 6, 2005, at 7:07 AM, Max Pfingsthorn wrote: > Thanks for all the replies. I do know that the readers should be > reopened, but that is not the problem. Could you work up a test case that shows this issue? From all I can see, you're doing the right thing. Something is amiss somewhere though. > I try to remove some docs, and add their new versions again to > incrementally update the index. After updating the index with the > same document twice, I opened the index in luke. There I saw that > the file's uri was present three times in the uri field. So, I > concluded, it didn't delete the docs right as there are in total > three documents which contain this term, right? By the way, > Reader.delete() returned 0 as well. > > I thought I used Field.Keyword(), but actually I use > > doc.add(new Field(URI_FIELD, uri, true, true, false)); Same thing in this case. new Field(name, value, true, true, false) is the same as Field.Keyword(name, value) > to add the uri to the doc. I can see it in luke, and even find the > docs when searching for it (using the KeywordAnalyzer). > > Any ideas? Nothing comes to mind from what I've seen thus far. An easily runnable example demonstrating this issue would be the next step. Erik > > Thanks! > max > > > -----Original Message----- > From: Daniel Naber [mailto:[EMAIL PROTECTED] > Sent: Friday, June 03, 2005 20:10 > To: java-user@lucene.apache.org > Subject: Re: deleting on a keyword field > > > On Friday 03 June 2005 18:50, Max Pfingsthorn wrote: > > >> reader.delete(new Term(URI_FIELD, uri)); >> >> This does not remove anything. Do I have to make the uri a normal >> field? >> > > How do you know nothing was deleted? Are you aware that you need to > re-open > your IndexSearcher/Reader in order to see the changes made to the > index? > > Regards > Daniel > > -- > http://www.danielnaber.de > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]