term
. This is useful if one uses a document field to hold a unique ID string for the document. Then to delete such a document, one merely constructs a term with the appropriate field and the unique ID string as its text and passes it to this method. Returns the number of documents deleted.
@return the number of documents deleted
@see IndexReader#deleteDocuments(Term)
@throws IllegalStateException if the index is closed
term
indexed. This is useful if one uses a document field to hold a unique ID string for the document. Then to delete such a document, one merely constructs a term with the appropriate field and the unique ID string as its text and passes it to this method. See {@link #deleteDocument(int)} for information about when this deletion will become effective.
@return the number of documents deleted
@throws StaleReaderException if the index has changedsince this reader was opened
@throws CorruptIndexException if the index is corrupt
@throws LockObtainFailedException if another writerhas this index open (write.lock
could not be obtained)
@throws IOException if there is a low-level IO error
term
. NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.
@param term the term to identify the documents to be deleted @throws CorruptIndexException if the index is corrupt @throws IOException if there is a low-level IO error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|