Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ This command uses HTTP GET and returns a list of loaded plugins and their config

[source,bash]
----
curl http://localhost:8983/api/cluster/plugin
curl 'http://localhost:8983/api/cluster/plugin'
----

=== Add Plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/collections/{collectionName}/shards -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/collections/{collectionName}/shards' -H 'Content-Type: application/json' -d '
{
"split": {
"shard": "shard1",
Expand Down Expand Up @@ -115,7 +115,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cluster/commands/1000
curl 'http://localhost:8983/api/cluster/commands/1000'
----
====
======
Expand Down Expand Up @@ -203,13 +203,13 @@ V2 API::
Delete a single request response:
[source,bash]
----
curl -X DELETE http://localhost:8983/api/cluster/commands/1000
curl -X DELETE 'http://localhost:8983/api/cluster/commands/1000'
----

Flush out all stored completed and failed async request responses:
[source,bash]
----
curl -X DELETE http://localhost:8983/api/cluster/commands
curl -X DELETE 'http://localhost:8983/api/cluster/commands'
----
====
======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ V1 API::
====
[source,bash]
----
curl http://localhost:8983/solr/techproducts/config/overlay?omitHeader=true
curl 'http://localhost:8983/solr/techproducts/config/overlay?omitHeader=true'
----
====

Expand All @@ -346,7 +346,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/collections/techproducts/config/overlay?omitHeader=true
curl 'http://localhost:8983/api/collections/techproducts/config/overlay?omitHeader=true'
----
====
======
Expand Down Expand Up @@ -503,7 +503,7 @@ Make a call to the new request handler to check if it is registered:

[source,bash]
----
curl http://localhost:8983/solr/techproducts/mypath?omitHeader=true
curl 'http://localhost:8983/solr/techproducts/mypath?omitHeader=true'
----

And you should see the following as output:
Expand Down Expand Up @@ -673,7 +673,7 @@ V1 API::
====
[source,bash]
----
curl http://localhost:8983/solr/techproducts/config/overlay?omitHeader=true
curl 'http://localhost:8983/solr/techproducts/config/overlay?omitHeader=true'
----
====

Expand All @@ -682,7 +682,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/collections/techproducts/config/overlay?omitHeader=true
curl 'http://localhost:8983/api/collections/techproducts/config/overlay?omitHeader=true'
----
====
======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ V1 API::
====
[source,bash]
----
curl http://localhost:8983/admin/cores?action=CREATE&name=mycore&instanceDir=path/to/instance&configSet=configset2
curl 'http://localhost:8983/admin/cores?action=CREATE&name=mycore&instanceDir=path/to/instance&configSet=configset2'
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ With the v2 API, use a `GET` request to `/configsets/__config_name__/files`:

[source,bash]
----
curl -o myConfigSet.zip "http://localhost:8983/api/configsets/myConfigSet/files"
curl -o myConfigSet.zip 'http://localhost:8983/api/configsets/myConfigSet/files'
----

The configset will be downloaded as a ZIP file that can be extracted and used locally, or re-uploaded to another Solr instance.
Expand Down Expand Up @@ -180,7 +180,7 @@ With the v1 API, the `upload` command must be capitalized as `UPLOAD`:
----
(cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip

curl "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet" --header "Content-Type:application/octet-stream" --data-binary @myconfigset.zip
curl 'http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet' --header "Content-Type:application/octet-stream" --data-binary @myconfigset.zip
----

The same can be achieved using a Unix pipe with a single request as follows:
Expand Down Expand Up @@ -248,7 +248,7 @@ The filename to upload is provided via the `filePath` parameter:

[source,bash]
----
curl "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet&filePath=solrconfig.xml" --header "Content-Type:application/octet-stream"
curl 'http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet&filePath=solrconfig.xml' --header "Content-Type:application/octet-stream"
--data-binary @solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
----
====
Expand Down Expand Up @@ -330,14 +330,14 @@ Use a `GET` request to `/api/configsets/\{configSetName}/files/\{filePath}`:

[source,bash]
----
curl "http://localhost:8983/api/configsets/myConfigSet/files/solrconfig.xml"
curl 'http://localhost:8983/api/configsets/myConfigSet/files/solrconfig.xml'
----

For nested files within the configset:

[source,bash]
----
curl "http://localhost:8983/api/configsets/myConfigSet/files/lang/stopwords_en.txt"
curl 'http://localhost:8983/api/configsets/myConfigSet/files/lang/stopwords_en.txt'
----
====
======
Expand Down Expand Up @@ -477,7 +477,7 @@ The name of the configset to delete is provided as a path parameter:

[source,bash]
----
curl -X DELETE http://localhost:8983/api/configsets/myConfigSet
curl -X DELETE 'http://localhost:8983/api/configsets/myConfigSet'
----
====
======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Retrieve core information from a node in cloud mode.

[source.bash]
----
curl http://localhost:8983/solr/techproducts/admin/info
curl 'http://localhost:8983/solr/techproducts/admin/info'
----

[source.json]
Expand Down Expand Up @@ -77,7 +77,7 @@ Retrieve system information from a core, without cloud mode.

[source.bash]
----
curl http://localhost:8983/solr/gettingstarted/admin/system
curl 'http://localhost:8983/solr/gettingstarted/admin/system'
----

[source.json]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cores/
curl 'http://localhost:8983/api/cores/'
----

To get the status for a single core:

[source,bash]
----
curl http://localhost:8983/api/cores/techproducts
curl 'http://localhost:8983/api/cores/techproducts'
----

To skip returning information about the index:

[source,bash]
----
curl http://localhost:8983/api/cores?indexInfo=false
curl 'http://localhost:8983/api/cores?indexInfo=false'
----

====
Expand Down Expand Up @@ -136,7 +136,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cores -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/cores' -H 'Content-Type: application/json' -d '
{
"name": "techproducts_v2",
"configSet": "sample_techproducts_configs"
Expand Down Expand Up @@ -314,7 +314,7 @@ V2 API::

[source,bash]
----
curl -X POST http://localhost:8983/api/cores/techproducts/reload
curl -X POST 'http://localhost:8983/api/cores/techproducts/reload'
----
====
======
Expand Down Expand Up @@ -352,15 +352,15 @@ V1 API::
====
[source,bash]
----
curl "http://localhost:8983/solr/admin/cores?action=RENAME&core={currentCoreName}&other=newCoreName"
curl 'http://localhost:8983/solr/admin/cores?action=RENAME&core={currentCoreName}&other=newCoreName'
----
====
V2 API::
+
====
[source,bash]
----
curl http://localhost:8983/api/cores/{currentCoreName}/rename -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/cores/{currentCoreName}/rename' -H 'Content-Type: application/json' -d '
{
"to": "newCoreName"
}
Expand Down Expand Up @@ -424,7 +424,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cores/{coreName}/swap -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/cores/{coreName}/swap' -H 'Content-Type: application/json' -d '
{
"with": "_other-core-name_"
}
Expand Down Expand Up @@ -492,7 +492,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cores/techproducts/unload -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/cores/techproducts/unload' -H 'Content-Type: application/json' -d '
{}
'
----
Expand Down Expand Up @@ -570,7 +570,7 @@ V1 API::
====
[source,bash]
----
curl "http://localhost:8983/solr/admin/cores?action=MERGEINDEXES&core={targetCoreName}&indexDir=path/to/core1/data/index&indexDir=path/to/core2/data/index"
curl 'http://localhost:8983/solr/admin/cores?action=MERGEINDEXES&core={targetCoreName}&indexDir=path/to/core1/data/index&indexDir=path/to/core2/data/index'
----
====

Expand All @@ -579,7 +579,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cores/{targetCoreName}/merge-indices -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/cores/{targetCoreName}/merge-indices' -H 'Content-Type: application/json' -d '
{
"indexDirs": ["path/to/core1/data/index","path/to/core2/data/index"]
}
Expand All @@ -601,7 +601,7 @@ V1 API::
====
[source,bash]
----
curl "http://localhost:8983/solr/admin/cores?action=mergeindexes&core={targetCoreName}&srcCore=core1&srcCore=core2"
curl 'http://localhost:8983/solr/admin/cores?action=mergeindexes&core={targetCoreName}&srcCore=core1&srcCore=core2'
----
====

Expand All @@ -610,7 +610,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/cores/{targetCoreName}/merge-indices -H 'Content-Type: application/json' -d '
curl 'http://localhost:8983/api/cores/{targetCoreName}/merge-indices' -H 'Content-Type: application/json' -d '
{
"srcCores": ["core1","core2"]
}
Expand Down Expand Up @@ -920,7 +920,7 @@ V2 API::
====
[source,bash]
----
curl http://localhost:8983/api/node/commands/id
curl 'http://localhost:8983/api/node/commands/id'
----
====
======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Expects a single content stream shaped like this, where every document includes
+
[source,bash]
----
curl "http://localhost:8983/solr/<collection>/analysis/document" -H "Content-type:text/xml" --data-binary @mydoc.xml
curl 'http://localhost:8983/solr/<collection>/analysis/document' -H "Content-type:text/xml" --data-binary @mydoc.xml
----
+
The response breaks each field down by analysis stage, alternating the analyzer/filter class name with the tokens it produced (trimmed here for brevity):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ So now let’s see this API in action, starting with a simple GET request:

[source,bash]
----
curl "http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english"
curl 'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english'
----

Assuming you sent this request to Solr, the response body is a JSON document:
Expand Down Expand Up @@ -115,7 +115,7 @@ Now, let’s add a new word to the English stop word list using an HTTP PUT:

[source,bash]
----
curl -X PUT -H 'Content-type:application/json' --data-binary '["foo"]' "http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english"
curl -X PUT -H 'Content-type:application/json' --data-binary '["foo"]' 'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english'
----

Here we’re using curl to PUT a JSON list containing a single word “foo” to the managed English stop words set.
Expand All @@ -126,7 +126,7 @@ You can test to see if a specific word exists by sending a GET request for that

[source,bash]
----
curl "http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english/foo"
curl 'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english/foo'
----

This request will return a status code of 200 if the child resource (foo) exists or 404 if it does not exist the managed list.
Expand All @@ -135,7 +135,7 @@ To delete a stop word, you would do:

[source,bash]
----
curl -X DELETE "http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english/foo"
curl -X DELETE 'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english/foo'
----

NOTE: PUT/POST is used to add terms to an existing list instead of replacing the list entirely.
Expand Down Expand Up @@ -167,7 +167,7 @@ To get the map of managed synonyms, send a GET request to:

[source,bash]
----
curl "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english"
curl 'http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english'
----

This request will return a response that looks like:
Expand Down Expand Up @@ -200,7 +200,7 @@ To add a new synonym mapping, you can PUT/POST a single mapping such as:

[source,bash]
----
curl -X PUT -H 'Content-type:application/json' --data-binary '{"mad":["angry","upset"]}' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english"
curl -X PUT -H 'Content-type:application/json' --data-binary '{"mad":["angry","upset"]}' 'http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english'
----

The API will return status code 200 if the PUT request was successful.
Expand All @@ -211,7 +211,7 @@ For example, you could PUT the following list of symmetric synonyms using the JS

[source,bash]
----
curl -X PUT -H 'Content-type:application/json' --data-binary '["funny", "entertaining", "whimiscal", "jocular"]' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english"
curl -X PUT -H 'Content-type:application/json' --data-binary '["funny", "entertaining", "whimiscal", "jocular"]' 'http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english'
----

Note that the expansion is performed when processing the PUT request so the underlying persistent state is still a managed map.
Expand Down Expand Up @@ -249,7 +249,7 @@ Assuming you have the `managed_en` field type shown above defined in your schema

[source,bash]
----
curl "http://localhost:8983/solr/techproducts/schema/managed"
curl 'http://localhost:8983/solr/techproducts/schema/managed'
----

The response body is a JSON document containing metadata about managed resources under the /schema root:
Expand Down Expand Up @@ -289,7 +289,7 @@ To create this endpoint, send the following PUT/POST request to the endpoint we
----
curl -X PUT -H 'Content-type:application/json' --data-binary \
'{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
"http://localhost:8983/solr/techproducts/schema/analysis/stopwords/german"
'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/german'
----

Solr will respond with status code 200 if the request is successful.
Expand All @@ -299,7 +299,7 @@ From here you can start adding German stop words as we saw above:
[source,bash]
----
curl -X PUT -H 'Content-type:application/json' --data-binary '["die"]' \
"http://localhost:8983/solr/techproducts/schema/analysis/stopwords/german"
'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/german'
----

For most users, creating resources in this way should never be necessary, since managed resources are created automatically when configured.
Expand All @@ -310,5 +310,5 @@ For instance, the managed resource for German that we created above can be delet

[source,bash]
----
curl -X DELETE "http://localhost:8983/solr/techproducts/schema/analysis/stopwords/german"
curl -X DELETE 'http://localhost:8983/solr/techproducts/schema/analysis/stopwords/german'
----
Loading
Loading