11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1000<br />

<br />

commitWithin<br />

The commitWithin settings allow forcing document commits to happen in a defined time period. This is used<br />

most frequently with Near Real Time Searching, and for that reason the default is to perform a soft commit. This<br />

does not, however, replicate new documents to slave servers in a master/slave environment. If that's a<br />

requirement for your implementation, you can force a hard commit by adding a parameter, as in this example:<br />

<br />

false<br />

<br />

With this configuration, when you call commitWithin as part of your update message, it will automatically<br />

perform a hard commit every time.<br />

Event Listeners<br />

The UpdateHandler section is also where update-related event listeners can be configured. These can be<br />

triggered to occur after any commit ( event="postCommit" ) or only after optimize commands ( event="postO<br />

ptimize").<br />

Users can write custom update event listener classes, but a common use case is to run external executables via<br />

the RunExecutableListener:<br />

Setting<br />

exe<br />

Description<br />

The name of the executable to run. It should include the path to the file, relative to <strong>Solr</strong> home.<br />

dir The directory to use as the working directory. The default is ".".<br />

wait Forces the calling thread to wait until the executable returns a response. The default is true.<br />

args<br />

env<br />

Any arguments to pass to the program. The default is none.<br />

Any environment variables to set. The default is none.<br />

Transaction Log<br />

As described in the section RealTime Get, a transaction log is required for that feature. It is configured in the upd<br />

ateHandler section of solrconfig.xml.<br />

Realtime Get currently relies on the update log feature, which is enabled by default. It relies on an update log,<br />

which is configured in solrconfig.xml, in a section like:<br />

<br />

${solr.ulog.dir:}<br />

<br />

Three additional expert-level configuration settings affect indexing performance and how far a replica can fall<br />

behind on updates before it must enter into full recovery - see the section on write side fault tolerance for more<br />

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

451

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

Saved successfully!

Ooh no, something went wrong!