Command Line Tools -
This script is used to interact with the Search functionality included with
Riak. Make sure you've first
enabled Search. The
INDEX argument is
optional for all commands and defaults to
search-cmd set-schema [INDEX] SCHEMAFILE : Set schema for an index. search-cmd show-schema [INDEX] : Display the schema for an index. search-cmd clear-schema-cache : Empty the schema cache on all nodes. search-cmd search [INDEX] QUERY : Perform a search. search-cmd search-doc [INDEX] QUERY : Perform a document search. search-cmd explain [INDEX] QUERY : Ouputs the query plan. search-cmd index [INDEX] PATH : Index files in a path. search-cmd delete [INDEX] PATH : De-index files in a path. search-cmd solr [INDEX] PATH : Run the Solr file. search-cmd install BUCKET : Install kv/search integration hook search-cmd uninstall BUCKET : Uninstall kv/search integration hook search-cmd test PATH : Run a test package
set-schema [INDEX] SCHEMAFILE
Set the schema for a given index. If you don't explicitly set the schema for an index it will use the default schema.
Show the schema for a given index.
Search stores its schemas in Riak just like any other object. However, to avoid the costliness of getting an object each time the schema information is needed it caches the schema object locally on each node. If you've modified your schema you'll want to clear this cache in order to make sure the latest version is read from Riak.
search [INDEX] QUERY
Execute the given query on the index returning the document id, properties, and score. The query syntax is the same as Lucene.
search-doc [INDEX] QUERY
search but also returns all the fields too.
explain [INDEX] QUERY
Outputs the query plan for the specified index query.
index [INDEX] PATH
Index the document at the given path. See the indexing section for more details.
delete [INDEX] PATH
Used to delete a document from the index. See the indexing section for more details.
solr [INDEX] PATH
Index solr documents. See the indexing section for more details.
Install the Search precommit hook on the given bucket. This allows one to index incoming objects.
Uninstall the Search precommit hook on the given bucket.
Run the Search test script at the given path.