Lucene's IndexWriter allows users to update documents by Term via this
method signature:
void updateDocument(Term term, Document doc)
But what about updating them by Query? Like so:
void updateDocument(Query query, Document doc)
1) How can this be done? As far as I know there is no such method
si
So Update basically is nothing but delete and add (a fresh doc). You could
just go ahead at using the deletedocument(Query query) function and then
adding the new document? That is the general approach for such cases and it
works just about fine.
--
Anshum Gupta
http://ai-cafe.blogspot.com
On We
On Wed, Apr 13, 2011 at 09:15:15AM -0400, Pulkit Singhal wrote:
> Lucene's IndexWriter allows users to update documents by Term via this
> method signature:
> void updateDocument(Term term, Document doc)
>
> But what about updating them by Query? Like so:
> void updateDocument(Query query, Documen