Method UpdateDocument
UpdateDocument(Term, Document)
Updates a document by first deleting the document(s)
containing term
and then adding the new
document. The delete and then add are atomic as seen
by a reader on the same index (flush may happen only after
the add).
NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.
Declaration
public virtual void UpdateDocument(Term term, Document doc)
Parameters
Type | Name | Description |
---|---|---|
Term | term | the term to identify the document(s) to be deleted |
Document | doc | the document to be added |
UpdateDocument(Term, Document, Analyzer)
Updates a document by first deleting the document(s)
containing term
and then adding the new
document. The delete and then add are atomic as seen
by a reader on the same index (flush may happen only after
the add).
NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.
Declaration
public virtual void UpdateDocument(Term term, Document doc, Analyzer analyzer)
Parameters
Type | Name | Description |
---|---|---|
Term | term | the term to identify the document(s) to be deleted |
Document | doc | the document to be added |
Analyzer | analyzer | the analyzer to use when analyzing the document |