Suppose I have a (useful) document stored in a Lucene index, and I have a variant that I'd also like to be able to search. This variant has the exact same data as the original document, but with some extra fields. I'd like to be able to use an IndexReader to get the document that I stored, use the document's add method to put my extra fields in, and then add that document to the index using an IndexWriter. This doesn't seem to work, in general. Non-stored fields of the original document are not in the variant document. This makes sense from an OO point of view (how would that document object possibly have the non-stored data of the original doc), but is there some lower-level way to do what I want to do?
It's somewhat expensive to completely re-create my document, as it relies on data parsed from (often large) pdf and MS Office files. I'd like to be able to use the already-stored terms that are in my index and associated with my existing document. Can I iterate through the terms of my index and add references to my newly-added document? Is there any utility to make this work nicely? --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org