Skip to content
This repository

Riak + Solr

Merge pull request #354 from basho/bugfix/jra/issue_352

Remove logging of ops sent to Solr when indexing fails.
latest commit 490d1b6337
Jon Anderson bowrocker authored April 15, 2014
Octocat-spinner-32 .rebar_plugins Remove riak_test as dependency January 08, 2013
Octocat-spinner-32 docs Merge pull request #348 from basho/rz/doc/security-no-caps March 28, 2014
Octocat-spinner-32 include Pass opts to JVM March 12, 2014
Octocat-spinner-32 java_src Use short circuit logical OR operator January 07, 2014
Octocat-spinner-32 misc Update bench driver to pass df param February 19, 2014
Octocat-spinner-32 priv Merge pull request #341 from basho/bugfix/rz/jvm-opts March 26, 2014
Octocat-spinner-32 rel_etc move out of priv August 16, 2013
Octocat-spinner-32 riak_test Merge pull request #342 from basho/bug/er/add-test-encoding March 17, 2014
Octocat-spinner-32 solr-patches Update patches for Solr 4.7.0 March 13, 2014
Octocat-spinner-32 src Remove logging of ops sent to Solr to fix issue 352. April 01, 2014
Octocat-spinner-32 test Merge pull request #341 from basho/bugfix/rz/jvm-opts March 26, 2014
Octocat-spinner-32 tools Pull various files from Solr example March 13, 2014
Octocat-spinner-32 .gitignore Pull various files from Solr example March 13, 2014
Octocat-spinner-32 Spitballing ideas for better indexing August 13, 2012
Octocat-spinner-32 Makefile Only set REBAR variable if its not set February 26, 2014
Octocat-spinner-32 Use one-to-one mapping example in README December 04, 2013
Octocat-spinner-32 dialyzer.ignore-warnings Ignore application:set_env dialyzer errors February 26, 2014
Octocat-spinner-32 rebar Update rebar to 2.1.0-166 to pick up update-deps fix October 15, 2013
Octocat-spinner-32 rebar.config Download custom jars from s3 February 20, 2014
Octocat-spinner-32 Update to 0.5.2 to fix a couple bugs March 03, 2014


NOTICE: Yokozuna is in alpha stage. It is under active development. Breaking changes could occur at any moment. In a future release it will replace Riak Search.

Yokozuna - Horizontal rope. The top rank in sumo, usually translated Grand Champion. The name comes from the rope a yokozuna wears.

The goal of the Yokozuna application is to integrate Apache Solr with Riak in order to find the "top rank" documents for a given query.

Getting Started


See the INSTALL doc for installing Riak-Yokozuna and forming a development cluster.

Creating an Index

An index must be created for bucket data to be indexed under. Many buckets may use the same index. To create an index via the HTTP interface the following.

curl -XPUT -i 'http://localhost:10018/search/index/my_index'

Create Bucket Type, and Associate Index

N.B. This is a breaking change in the 0.12.0 version. Previously bucket types didn't have to be created.

A bucket type must be created to hold the bucket and an index must be associated with the bucket via the search_index property.

riak-admin bucket-type create data '{"props":{}}'
riak-admin bucket-type activate data

curl -i -H 'content-type: application/json' -X PUT 'http://localhost:10018/types/data/buckets/my_bucket/props' -d '{"props":{"search_index":"my_index"}}'

Index Some Data

Indexing data is a matter of writing data to KV. Currently Yokozuna knows hows to index plain text, XML, and JSON.

curl -i -H 'content-type: text/plain' -X PUT 'http://localhost:10018/types/data/buckets/my_bucket/keys/name' -d "Ryan Zezeski"


The syntax for querying Yokozuna is the same as querying a single instance of Solr. Yokozuna actually uses Solr's distributed search API but that is hidden for you. This means you don't have to worry about where your shards are located.

curl 'http://localhost:10018/search/my_index?q=text:Ryan'

The canonical Solr URL is also supported allowing the use of an existing Solr client to query Yokozuna.

curl 'http://localhost:10018/solr/my_index/select?q=text:Ryan'
Something went wrong with that request. Please try again.