Dmitri, I had asked a similar question on the Java Lucene group and I got
this response. Hope this helps.

Shashi


Try the following:
>
> * open your index, and mark all documents as deleted except 1/Nth that
> should fill the first shard. Close the index, BUT DO NOT OPTIMIZE IT!
>
> * create IndexWriter, and use addIndexes to add the original index. Only
> non-deleted docs will be copied.
>
> * open the original index and use undeleteAll() to revert the deletions.
>
> * mark the next 1/Nth documents as deleted
> ...
> * repeat the cycle as many times as needed
>
> A more elegant version of this algorithm can be implemented using
> FilterIndexReader.
>
> --
> Best regards,
> Andrzej Bialecki     <><
>  ___. ___ ___ ___ _ _   __________________________________
> [__ || __|__/|__||\/|  Information Retrieval, Semantic Web
> ___|||__||  \|  ||  |  Embedded Unix, System Integration
> http://www.sigram.com  Contact: info at sigram dot com
>


On Tue, Mar 24, 2009 at 1:42 AM, Dmitri Moore <[email protected]> wrote:

> Hi there.
> Does anyone know if it's possible to split an existing Lucene index into
> multiple sub-indexes based on a certain rule (for example, based on a
> URI matching regex pattern)?
>
> Any guidance will be highly appreciated.
>
> Thank you,
> Dmitri.
>

Reply via email to