Hi Roger,

The method usage seems correct to me. Are you saying that search with
TermQuery(Term("uuid","76")) returns only one of many existing documents,
but deleteDocuments(Term("uuid","76")) deletes all docs? (also docs not
returned by the search for this term?) Could you send here a small program
that shows this?

Regards,
Doron

news <[EMAIL PROTECTED]> wrote on 27/03/2007 19:58:26:

> Hi there,
>
> I'm trying to delete a single document by using its uuid field:
>
>      uuid = new Term("uuid", item.getUuid().toString());
>      writer.deleteDocuments(uuid);
>      writer.close();
>
> However, it appears that this operation is deleting *every* document,
> whether the uuid matches or not. The uuid field is created with
>
>      doc.add(new Field("uuid", item.getUuid().toString(),
>              Field.Store.YES, Field.Index.UN_TOKENIZED));
>
> and I can make queries like uuid:76 which return the correct document.
> Is there something wrong with the way I am using deleteDocuments()? I'm
> using lucene-2.1.0.
>
> Thanks in advance,
>
> Roger


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to