lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: appending field to an existing index
Date Fri, 01 Feb 2008 08:19:43 GMT

Woops -- disregard this!  Chris' approach will work.  And, we don't  
need addParallelIndices!

Mike

Michael McCandless wrote:

>
> 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.
>
> Mike
>
> 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();
>>
>> ...to "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: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>


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


Mime
View raw message