Hi all, I am trying to figure out how to easily remove or add a keyword from a document's index (or equivalently, decrease/increase that keyword's frequency in the document).
I know Lucene allows you to reindex a document using the IndexWriter.updateDocument(docPath, doc) call but that's too expensive for my purposes. I already know the removed & added keywords from a previous pass through the document and I would like to avoid Lucene doing another pass. I am looking for a IndexWriter.adjustTermFreqInDoc("keyword", doc, deltafreq) which will either change the frequency of "keyword" in 'doc' by 'deltafreq'. This could result in either adding or removing a keyword from the document in the index. Is there a way to do this? At first I thought adding term vectors to the index could help with this but it seems like that will dramatically increase the index size. Cheers, Alin