Matt Quail wrote:
I have a similar problem, for which ParallelReader looks like a good
solution -- except for the problem of creating a set of indices with
matching document numbers.


I have wondered about this as well. Are there any *sure fire* ways of creating (and updating) two indices so that doc numbers in one index deliberately correspond to doc numbers in the other index?

If you add the documents in the same order to both indexes and perform the same deletions on both indexes then they'll have the same numbers.

If this is not convenient, then you could add an id field to all documents in the primary index. Then create (or re-create) the secondary index by iterating through the values in a FieldCache of this id field.

ParallelReader was not really designed to support incremental updates of fields, but rather to accellerate batch updates. For incremental updates you're probably better served by updating a single index.

One could define an "acl" IndexReader subclass that generates termDoc lists on the fly by looking in an external database. This would require a mapping between Lucene document ids and external document IDs. A FieldCache, as described above, could serve that purpose.

Doug

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

Reply via email to