Re: Deleting and adding docs

2008-08-09 Thread Doron Cohen
> > doc.add(new Field(ID_FIELD, id, Field.Store.YES, Field.Index.NO)); > writer.deleteDocuments(new Term(ID_FIELD, id)); > int i = reader.deleteDocuments(new Term(ID_FIELD, id)); //i returns 0 > Both failed. I try to delete one id value that I know for sure it was added > in the first step. > For

Re: Deleting and adding docs

2008-08-09 Thread Karl Wettin
9 aug 2008 kl. 03.27 skrev Andre Rubin: THIRD STEP: QUERYING I query the index from another field, but the docs added on the second step don't show and the ones deleted on the second step still return in the results. Any ideas what I'm doing wrong? I think you forget to reopen/open a new

Deleting and adding docs

2008-08-08 Thread Andre Rubin
I'm new to Lucene, and I've been reading a lot of messages regarding deleting docs. But I think my problem is more basic. I can't delete docs from my index and (after the index is created the first time and the writer is closed) I can't add new documents to an existing index. Sorry for the lengthy