On Wed, Dec 24, 2008 at 3:31 AM, Alan May <j.alan....@gmail.com> wrote:

>
> I have multiple SolrJ clients that will be sending small update requests
> but
> should be staggered in time to prevent concurrent updates.  However, to add
> additional margin of error, I would like to apply the safest locking
> mechanism possible to avoid corruption.  We have a single solr server.
>  From
> what I'm reading in the solrconfig.xml, I'm gathering that perhaps the
> NativeFSLockFactory would be more appropriate than the default
> SingleInstanceLockFactory or the SimpleFSLockFactory.
>

Solr supports query/update requests from multiple threads and there is no
explicit locking per client. You don't need to worry about the lock section
in solrconfig.xml. It is intended to protect the index from external changes
(an external application writing direcly to the index or when multiple Solr
processes are accidentally started on the same index folder).

Go ahead and have your clients query/update Solr. Just note that all changes
to the index will be visible after a commit. So make sure the last client
calls a commit or else use the autoCommit feature.

HTH.

-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to