On Wed, Nov 25, 2009 at 3:05 PM, Rakhi Khatwani <rkhatw...@gmail.com> wrote:

> Hi,
>      Is there any article which explains the locks in solr??
> there is some info on solrconfig.txt which says that you can set the lock
> type to none(NoLockFactory), single(SingleInstanceLockFactory),
> NativeFSLockFactory and simple(SimpleFSLockFactory) which locks everytime
> we
> create a new file.
> suppose my index dir has the following files:
> _2s.fdt, _2t.fnm, _2u.nrm, _2v.tii, _2x.fdt, _2y.fnm, _2z.nrm, _30.tii,
> _2s.fdx, _2t.frq, _2u.prx, _2v.tis _2x.fdx, _2y.frq _2z.prx, _30.tis,
> _2s.fnm, _2t.nrm, _2u.tii, _2w.fdt _2x.fnm, _2y.nrm _2z.tii, segments_2s,
> _2s.frq, _2t.prx, _2u.tis, _2w.fdx _2x.frq, _2y.prx _2z.tis, segments.gen
>
> 1.)   I assume for each of these files there is a lock. please correct me
> if
> i am wrong.
>

No. The index directory has one lock. Individual files are not locked
separately.


> 2.) what are the different lock types in terms of read/write/updates?
>

Locks are only used for preventing more than one IndexWriters (or Solr
instances/cores) writing to the same index. They do not prevent reads. They
also do not prevent multiple writes from the same Solr core (there is some
synchronization but it has nothing to do with these locks)


> 3.) Can we have a document level locking scheme?
>

No. I think you have grossly misunderstood the purpose of locks in Solr.


> 4.) we would like to know the best way to handle multiple simulataneous
> writes to the index
>

With one Solr instance, you can do writes concurrently without a problem.

-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to