problems with deleteDocuments

2007-07-04 Thread Nick Johnson
I'm having several problems with deleting documents with Lucene 2.2. Via the IndexWriter, I can successfully delete a document by its primary key via a Term, but ONLY if the field was stored as Field.Index.UN_TOKENIZED. If it was stored as TOKENIZED, the debug output says it is deleting the do

Re: problems with deleteDocuments

2007-07-04 Thread Yonik Seeley
Nick, are you opening a new IndexSearcher after you close the IndexWriter? -Yonik On 7/4/07, Nick Johnson <[EMAIL PROTECTED]> wrote: I'm having several problems with deleting documents with Lucene 2.2. Via the IndexWriter, I can successfully delete a document by its primary key via a Term, but

Re: problems with deleteDocuments

2007-07-04 Thread Erick Erickson
This is exactly the behavior I'd expect. Consider what would happen otherwise. Say you have documents with the following values for a field (call it blah). some data some data I put in the index lots of data data Then I don't want deleting on the term blah:data to remove all of them. Which seems

Re: problems with deleteDocuments

2007-07-04 Thread Nick Johnson
I am. On Wed, 4 Jul 2007, Yonik Seeley wrote: > Nick, are you opening a new IndexSearcher after you close the IndexWriter? -- "Courage isn't just a matter of not being frightened, you know. It's being afraid and doing what you have to do anyway." Doctor Who - Planet of the Daleks This messa

Re: problems with deleteDocuments

2007-07-04 Thread Nick Johnson
I think I follow you. I don't have a problem with storing something like a primary key as UN_TOKENIZED, though I'm a bit baffled about why it didn't work as TOKENIZED, since the _only_ thing in that field is the value of the primary key (ie, the string value of some integer). It seems like it

Re: problems with deleteDocuments

2007-07-04 Thread Erick Erickson
See below On 7/4/07, Nick Johnson <[EMAIL PROTECTED]> wrote: I think I follow you. I don't have a problem with storing something like a primary key as UN_TOKENIZED, though I'm a bit baffled about why it didn't work as TOKENIZED, since the _only_ thing in that field is the value of the primary

Re: problems with deleteDocuments

2007-07-04 Thread Nick Johnson
A little more digging and I found the problem (amazing what coffee can do). It was a bad assertion in my unit test. Basically I was checking to see that the article was indexed after the update, but didn't check to see whether it was indexed BEFORE the update. It wasn't. Or rather, it was,

Re: problems with deleteDocuments

2007-07-07 Thread Nadav Har'El
On Wed, Jul 04, 2007, Erick Erickson wrote about "Re: problems with deleteDocuments": > Consider what would happen otherwise. Say you have documents > with the following values for a field (call it blah). > some data > some data I put in the index > lots of data >

Re: problems with deleteDocuments

2007-07-08 Thread Erick Erickson
'El <[EMAIL PROTECTED]> wrote: On Wed, Jul 04, 2007, Erick Erickson wrote about "Re: problems with deleteDocuments": > Consider what would happen otherwise. Say you have documents > with the following values for a field (call it blah). > some data > some data I put in t