11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

lockType<br />

The LockFactory options specify the locking implementation to use.<br />

The set of valid lock type options depends on the DirectoryFactory you have configured. The values listed<br />

below are are supported by StandardDirectoryFactory (the default):<br />

native (default) uses NativeFSLockFactory to specify native OS file locking. If a second <strong>Solr</strong> process<br />

attempts to access the directory, it will fail. Do not use when multiple <strong>Solr</strong> web applications are<br />

attempting to share a single index.<br />

simple uses SimpleFSLockFactory to specify a plain file for locking.<br />

single (expert) uses SingleInstanceLockFactory. Use for special situations of a read-only index<br />

directory, or when there is no possibility of more than one process trying to modify the index (even<br />

sequentially). This type will protect against multiple cores within the same JVM attempting to access<br />

the same index. WARNING! If multiple <strong>Solr</strong> instances in different JVMs modify an index, this type will n<br />

ot protect against index corruption.<br />

hdfs uses HdfsLockFactory to support reading and writing index and transaction log files to a HDFS<br />

filesystem. See the section Running <strong>Solr</strong> on HDFS for more details on using this feature.<br />

For more information on the nuances of each LockFactory, see http://wiki.apache.org/lucene-java/AvailableLo<br />

ckFactories.<br />

native<br />

writeLockTimeout<br />

The maximum time to wait for a write lock on an IndexWriter. The default is 1000, expressed in milliseconds.<br />

1000<br />

Other Indexing Settings<br />

There are a few other parameters that may be important to configure for your implementation. These settings<br />

affect how or when updates are made to an index.<br />

Setting<br />

reopenReaders<br />

deletionPolicy<br />

infoStream<br />

Description<br />

Controls if IndexReaders will be re-opened, instead of closed and then opened, which is<br />

often less efficient. The default is true.<br />

Controls how commits are retained in case of rollback. The default is <strong>Solr</strong>DeletionPo<br />

licy, which has sub-parameters for the maximum number of commits to keep ( maxCom<br />

mitsToKeep), the maximum number of optimized commits to keep ( maxOptimizedCom<br />

mitsToKeep), and the maximum age of any commit to keep ( maxCommitAge), which<br />

supports DateMathParser syntax.<br />

The InfoStream setting instructs the underlying Lucene classes to write detailed debug<br />

information from the indexing process as <strong>Solr</strong> log messages.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

443

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!