Search Settings

Note on Search 2.0 vs. Legacy Search

This document refers to the new Riak Search 2.0 with Solr integration (codenamed Yokozuna). For information about the deprecated Riak Search, visit the old Riak Search Settings.

This document covers Riak’s Search subsystem from an operational perspective. If you are looking for more developer-focused docs, we recommend the following:

Although Riak Search is integrated into Riak and requires no special installation, it is not enabled by default. You must enable it in every node’s configuration files as follows:

search = on

JVM Installation

Because Solr is a Java application, you will need to install Java 1.6 or later on every node. We recommend installing Oracle’s JDK 7u25. Installation packages can be found on the Java SE 7 Downloads page and instructions on the documentation page.

Riak Config Settings

Setting search to on is required, but other search settings are optional. A list of these parameters can also be found in our configuration files documentation.

Field Default Valid values Description
search off on or off Enable or disable Search
search.anti_entropy.data_dir ./data/yz_anti_entropy Directory The directory in which Riak Search stores files related to active anti-entropy
search.root_dir ./data/yz Directory The root directory in which index data and configuration is stored
search.solr.start_timeout 30s Integer with time units (eg. 2m) How long Riak will wait for Solr to start (attempts twice before shutdown). Values lower than 1s will be rounded up to 1s.
search.solr.port 8093 Integer The port number to which Solr binds (note: binds on every interface)
search.solr.jmx_port 8985 Integer The port number to which Solr JMX (note: binds on every interface)
search.solr.jvm_options -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops Java command-line arguments The options to pass to the Solr JVM. Non-standard options, e.g. -XX, may not be portable across JVM implementations.

While most of the default values are sufficient, you may have to increase search.solr.start_timeout as more data is indexed, which may cause Solr to require more time to start.

Solr JVM and Ports

Riak Search runs one Solr process per node to manage its indexing and search functionality. While the underlying project, Yokozuna, manages index distribution, node coverage for queries, active anti-entropy (AAE), and JVM process management, you should provide plenty of RAM and diskspace for running both Riak and the JVM running Solr. We recommend a minimum of 6GB of RAM per node.

Concerning ports, be sure to take the necessary security precautions to prevent exposing the extra Solr and JMX ports to the outside world.

Solr for Operators

For further information on Solr monitoring, tuning, and performance, we recommend the following documents for getting started:

A wide variety of other documentation is available from the Solr OSS community.