lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <>
Subject Re: Re-combining already indexed documents
Date Fri, 02 Jan 2009 16:50:16 GMT

the easiest way would be to construct the combined document using the  
data from your primary source rather than reconstructing it from the  
index. If the source data no longer is available you could still  
reconstruct a token stream. The data is however a bit spread out so it  
can turn out to be a bit tricky. Payloads can only be accessed via  
TermPositions and start/end offsets can only be accessed via  the  
TermFreqVector. The fastest way to reconstruct the token stream would  
be to use the TermFreqVector but if you didn't store it at index time  
you would have traverse the inverted index using TermEnum and  
TermPositions in order to pick up the term values and positions. This  
can be a rather time consuming process if you have a large index.

The code of TermVectorAccessor in contrib/miscellaneous might be  


2 jan 2009 kl. 16.08 skrev <> <>:

> Hi,
> I have already indexed documents. I want to recombine them into new
> documents. Is this possible without the original documents - only  
> with the
> index?
> Example:
> doc1, doc2, doc3 are indexed.
> I want a new indexed doc4 which is indexed as if I had concatenated  
> doc1,
> doc2, doc3 into doc4 and then indexed doc4.
> Thank you
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message