lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: appending field to an existing index
Date Fri, 01 Feb 2008 08:16:06 GMT

I don't think this will do the right thing in this case, because  
addIndexes "appends" the documents from all indices together.

Whereas John wants to "merge in" a new field into all docs in an  
existing index.

Really what we need is a new "addParallellIndices" method.  I think,  
conceptually, it's really not that hard to do ("it's just software"),  
especially if the fields are completely orthogonal (which is the case  
here, I think)?  We would need a variant of SegmentMerger, that  
instead of appending everything, would "splice" the indices together,  
doc by doc.  The posting lists should be especially simple since each  
field is contiguous in the prx/frq files.


Chris Hostetter wrote:

> : I have to keep one index though. Is there a way to reproduce an  
> index from
> : an indexReader?
> asuming you have indexes that work in conjunction with eachther they
> way you want when using ParallelReader, you should (in theory) be  
> able to
> use...
>    ParallelReader r = ...;
>    IndexWriter w = new IndexWRiter(...);
>    w.addIndexes(new IndexReader[] { r });
>    w.close();
> "combine" those indexes into a single physical index.  but i've
> never personally tried it.  there may be quirks about  
> ParallelReader that
> prevent this from working.
> -Hoss
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message