Peer-reviewed code snippets that anyone can edit
A wiki for useful code snippets
Command-line interface to the Apache Solr REST API
r4 r5
1
1
+++ Solr Tool
2
2
 
3
3
A convenient command-line interface to Apache Solr, built around curl.
4
4
 
5
* Requires [http://xmlsoft.org/xmllint.html xmllint] - for pretty-printing the output.
6
* Requires [http://pygments.org Pygments] - for syntax-highlighting the output.
7
* Usage: solr BASE RESOURCE <ARGS>
5
Requires [http://xmlsoft.org/xmllint.html xmllint] - for pretty-printing the output. Requires [http://pygments.org Pygments] - for syntax-highlighting the output.
8
6
 
9
* {{BASE}} is either the http:// base of a solr instance, or
7
**Usage:** {{solr BASE RESOURCE <ARGS>}}
8
 
9
: {{BASE}} : is either the http:// base of a solr instance, or
10
10
  one of the known shortcuts in the case statement.
11
11
 
12
* {{RESOURCE}} is added as {{$BASE/$RESOURCE}} for a full REST URL.
12
: {{RESOURCE}} : is added as {{$BASE/$RESOURCE}} for a full REST URL.
13
13
 
14
* Remaining ARGS are passed to curl. Use {{-F key=value}} to POST form parameters.
14
Remaining ARGS are passed to curl. Use {{-F key=value}} to POST form parameters.
15
15
 
16
16
+++ Examples
17
17
 
18
18
[code=bash]
Tags added:
Tags removed: