lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <>
Subject Re: [lucy-user] Parallel indexing in same index dir using Lucy
Date Mon, 22 Sep 2014 13:58:04 GMT
On 9/22/14, 6:13 AM, Shahab Mohammed wrote:
> Hi,
> I am getting lock exception message when trying to run two parallel
> processes to index two documents at same index location. As i understand
> this is the default behaviour.
> Please advice if it will be possible to index two document at same time in
> parallel using same index location.

Only one Indexer object can hold the lock on a single index at a time.

"In general, only one Indexer at a time may write to an index safely. If
a write lock cannot be secured, new() will throw an exception."

If you want to work in parallel, try creating one-index-per-indexer and
then search them all with PolySearcher:

Or consider the background merging idiom, as here:

Peter Karman  .  .

View raw message