lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Adding Fields to Documents with UnStored Fields - crazy scheme?
Date Fri, 09 Jun 2006 23:29:52 GMT
On 6/8/06, Bob Arens <lists@absent-error.net> wrote:
> I've been handed a legacy index containing Documents with two Fields;
> one is a file ID, the other is contents of the file. The contents
> field was added using UnStored. Now, we want to add fields. Oh, the
> humanity!
>
> My crazy idea - can we add new Documents to the index with the Fields
> we wish to add, and duplicate file IDs? i.e. an entry for file ID Foo
> would consist of two Documents,
> Document X: fileID:<Foo>, contents:<unknown>
> Document Y:fileID:<Foo>, title:<Bar>, url:<www.baz.com>, etc.

Bob, it sounds like ParallelIndexReader is exactly what you need.
Iterate through the old Index, and add a new Document to a new second
index for each docid.  Then open a ParallelIndexReader over both, and
it looks like a unified index!

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
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