lucene-java-user mailing list archives

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

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
queries.

Luke
----- Original Message ----- 
From: "Alex Kiselevski" <ALEXKIS@Amdocs.com>
To: <lucene-user@jakarta.apache.org>
Sent: Wednesday, December 08, 2004 9:34 AM
Subject: Help to remove document



Hello,
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
mailto:alexkis@amdocs.com




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
recipient(s)
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
of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us
immediately
by replying to the message and deleting it from your computer.
Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message