lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <>
Subject Re: Help to remove document
Date Wed, 08 Dec 2004 14:38:16 GMT

The indexReader has a delete method that can do this:

public final void delete(int docNum)
throws IOException
Deletes the document numbered docNum. Once a document is deleted it will not
appear in TermDocs or TermPostitions enumerations. Attempts to read its
field with the document(int) method will result in an error. The presence of
this document may still be reflected in the
docFreq(org.apache.lucene.index.Term) statistic, though this will be
corrected eventually as the index is further modified.

There is an example of how it can be used in the Lucene demo. Ensure you
re-create the indexSearcher for the change to be reflected in your search

----- Original Message ----- 
From: "Alex Kiselevski" <>
To: <>
Sent: Wednesday, December 08, 2004 9:34 AM
Subject: Help to remove document

Help me pls, I want to know how to remove document from index

Alex Kiselevsky
 Speech Technology Tel: 972-9-776-43-46
R&D, Amdocs - Israel Mobile: 972-53-63 50 38

The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us
by replying to the message and deleting it from your computer.
Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message