2014-05-23 87 views

回答

1

有在Lucene locking factory docs提到不同的鎖定機制。默認情況下,使用NativeFSLockFactory爲正在索引的文檔獲取文件鎖定。爲使用不同的鎖定機構的設置可以在solrconfig.xml中

這裏是solconfig.xml

<!-- LockFactory 

    This option specifies which Lucene LockFactory implementation 
    to use. 

    single = SingleInstanceLockFactory - suggested for a 
       read-only index or when there is no possibility of 
       another process trying to modify the index. 
    native = NativeFSLockFactory - uses OS native file locking. 
       Do not use when multiple solr webapps in the same 
       JVM are attempting to share a single index. 
    simple = SimpleFSLockFactory - uses a plain file for locking 

    Defaults: 'native' is default for Solr3.6 and later, otherwise 
       'simple' is the default 

    More details on the nuances of each LockFactory... 
    http://wiki.apache.org/lucene-java/AvailableLockFactories 
--> 
<lockType>${solr.lock.type:native}</lockType> 
1

你說的是物理鎖或邏輯的版本控制片段是否會改變?對於邏輯版本控制,Solr 4+支持使用版本字段的樂觀併發。

你可以閱讀一下:

  1. Official documentation
  2. Detailed writeup
相關問題