Hi, Steven,

Thanks for the instant reply! But let's see the warning in the
ParallelReader javadoc:
"It is up to you to make sure all indexes are created and modified
the same way. For example, if you add documents to one index, you need
to add the same documents in the same order to the other indexes.
Failure to do so will result in undefined behavior."

To follow the warning, I need to index the all content again. So
basically it defeats my original purpose to keep two indexes: to save
the indexing for the large/stale content.

--
Chris Lu
-------------------------
Instant Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes


On 3/26/07, Steven Rowe <[EMAIL PROTECTED]> wrote:
I think ParallelReader, first released in Lucene-Java 1.9, should meet
your needs:

<http://lucene.apache.org/java/docs/api/org/apache/lucene/index/ParallelReader.html>

-----
An IndexReader which reads multiple, parallel indexes. Each index added
must have the same number of documents, but typically each contains
different fields. Each document contains the union of the fields of all
documents with the same document number. When searching, matches for a
query term are from the first index added that has the field.

This is useful, e.g., with collections that have large fields which
change rarely and small fields that change more frequently. The smaller
fields may be re-indexed in a new index and both indexes may be searched
together.

Warning: It is up to you to make sure all indexes are created and
modified the same way. For example, if you add documents to one index,
you need to add the same documents in the same order to the other
indexes. Failure to do so will result in undefined behavior.
-----

Steve

Chris Lu wrote:
> Hi, Gurus,
>
> One thing I want to do is: one index has fields like [primary-key,
> not-so-frequently-updated-fields, large-content-fields,...], and
> another index has [primary-key, frequently-updated-fields]. The
> purpose is to make the indexing process faster by keeping large/stale
> fields in one index and small/frequently updated fields in another,
> linked via primary-key field.
>
> If I do so, is it possible to keep the index search the same? Parallel
> index reader may not cut it because it works only for different
> Documents into different indexes. What I want is the same Document
> spread on different indexes.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to