lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giulio Cesare Solaroli <giulio.ces...@gmail.com>
Subject Re: Coping documents across indexes (Was: How to extract matching terms for a document given a query)
Date Thu, 17 Jun 2004 15:54:09 GMT
Replying to my own post ...

> > That's a nice idea. The rewritten query would be much smaller when
> > expanded against an index containing only the selected documents.
> 
> I have thought more about this option, and I have tried to implement
> the following policy:
> - find the matching documents (Hits);
> - create an IndexWriter associated to a RamDirectory;
> - for each document in the request range
>    * process the document;
>    * insert the document into the RamDirectory index
>          ramDiskWriter.addDocument(hits.doc(i));
> - when all the required documents have been processed (and inserted
> into the new ramDirectory index) rewrite the original query against
> this new index.
> 
> But this looks too nice to be true.
> 
> Indeed, the rewritten query (against the the index) is empty. :-[
> 
> Does anybody know if it is possible to copy documents across indexes
> for this purpose?

The documents are copied, but the new document contains only the
fields stored in the first index. :-[

Is it possible to copy document terms across  indexes, even if the
fields are not stored?

Thanks for your attention,

Giulio Cesare Solaroli

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message