SOLR-11530: add wt=xml to XML output examples until they can be changed to JSON

This commit is contained in:
Cassandra Targett 2017-10-24 15:03:23 -05:00
parent feda2ad006
commit 60966c3be1
15 changed files with 56 additions and 47 deletions

View File

@ -121,7 +121,7 @@ The response will include the status of the request and the new core names. If t
[source,text]
----
http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection&numShards=2&replicationFactor=1
http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection&numShards=2&replicationFactor=1&wt=xml
----
*Output*
@ -204,7 +204,7 @@ The response will include the status of the request and the cores that were relo
[source,text]
----
http://localhost:8983/solr/admin/collections?action=RELOAD&name=newCollection
http://localhost:8983/solr/admin/collections?action=RELOAD&name=newCollection&wt=xml
----
*Output*
@ -284,7 +284,7 @@ Split shard1 of the "anotherCollection" collection.
[source,text]
----
http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=anotherCollection&shard=shard1
http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=anotherCollection&shard=shard1&wt=xml
----
*Output*
@ -389,7 +389,7 @@ Create 'shard-z' for the "anImplicitCollection" collection.
[source,text]
----
http://localhost:8983/solr/admin/collections?action=CREATESHARD&collection=anImplicitCollection&shard=shard-z
http://localhost:8983/solr/admin/collections?action=CREATESHARD&collection=anImplicitCollection&shard=shard-z&wt=xml
----
*Output*
@ -443,7 +443,7 @@ Delete 'shard1' of the "anotherCollection" collection.
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETESHARD&collection=anotherCollection&shard=shard1
http://localhost:8983/solr/admin/collections?action=DELETESHARD&collection=anotherCollection&shard=shard1&wt=xml
----
*Output*
@ -496,7 +496,7 @@ Create an alias named "testalias" and link it to the collections named "anotherC
[source,text]
----
http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=testalias&collections=anotherCollection,testCollection
http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=testalias&collections=anotherCollection,testCollection&wt=xml
----
*Output*
@ -524,6 +524,15 @@ The output will contain a list of aliases with the corresponding collection name
=== Examples using LISTALIASES
*Input*
List the existing aliases, requesting information as XML from Solr:
[source,text]
----
http://localhost:8983/solr/admin/collections?action=LISTALIASES&wt=xml
----
*Output*
[source,xml]
@ -565,7 +574,7 @@ Remove the alias named "testalias".
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=testalias
http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=testalias&wt=xml
----
*Output*
@ -605,7 +614,7 @@ Delete the collection named "newCollection".
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection
http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection&wt=xml
----
*Output*
@ -682,7 +691,7 @@ Request ID to track this action which will be <<Asynchronous Calls,processed asy
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=test2&shard=shard2&replica=core_node3
http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=test2&shard=shard2&replica=core_node3&wt=xml
----
*Output*
@ -751,7 +760,7 @@ Request ID to track this action which will be <<Asynchronous Calls,processed asy
[source,text]
----
http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=test2&shard=shard2&node=192.167.1.2:8983_solr
http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=test2&shard=shard2&node=192.167.1.2:8983_solr&wt=xml
----
*Output*
@ -800,7 +809,7 @@ The response will include the status of the request and the properties that were
[source,text]
----
http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&val=https
http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&val=https&wt=xml
----
*Output*
@ -860,7 +869,7 @@ The response will include the status of the request.
[source,text]
----
http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=test1&split.key=a!&target.collection=test2
http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=test1&split.key=a!&target.collection=test2&wt=xml
----
*Output*
@ -1036,7 +1045,7 @@ The response will include the status of the request and the properties that were
[source,text]
----
http://localhost:8983/solr/admin/collections?action=ADDROLE&role=overseer&node=192.167.1.2:8983_solr
http://localhost:8983/solr/admin/collections?action=ADDROLE&role=overseer&node=192.167.1.2:8983_solr&wt=xml
----
*Output*
@ -1077,7 +1086,7 @@ The response will include the status of the request and the properties that were
[source,text]
----
http://localhost:8983/solr/admin/collections?action=REMOVEROLE&role=overseer&node=192.167.1.2:8983_solr
http://localhost:8983/solr/admin/collections?action=REMOVEROLE&role=overseer&node=192.167.1.2:8983_solr&wt=xml
----
*Output*
@ -1284,7 +1293,7 @@ The user defined request ID for the request. This can be used to track the statu
[source,text]
----
http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1000
http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1000&wt=xml
----
*Output*
@ -1307,7 +1316,7 @@ http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1000
[source,text]
----
http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1004
http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1004&wt=xml
----
*Output*
@ -1347,7 +1356,7 @@ Set to `true` to clear all stored completed and failed async request responses.
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=foo
http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=foo&wt=xml
----
*Output*
@ -1367,7 +1376,7 @@ http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=foo
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=bar
http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=bar&wt=xml
----
*Output*
@ -1387,7 +1396,7 @@ http://localhost:8983/solr/admin/collections?action=DELETESTATUS&requestid=bar
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETESTATUS&flush=true
http://localhost:8983/solr/admin/collections?action=DELETESTATUS&flush=true&wt=xml
----
*Output*
@ -1483,7 +1492,7 @@ This command would set the "preferredLeader" property (`property.preferredLeader
[source,text]
----
http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1&collection=collection1&replica=core_node1&property=preferredLeader&property.value=true
http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1&collection=collection1&replica=core_node1&property=preferredLeader&property.value=true&wt=xml
----
*Output*
@ -1559,7 +1568,7 @@ This command would delete the preferredLeader (`property.preferredLeader`) from
[source,text]
----
http://localhost:8983/solr/admin/collections?action=DELETEREPLICAPROP&shard=shard1&collection=collection1&replica=core_node1&property=preferredLeader
http://localhost:8983/solr/admin/collections?action=DELETEREPLICAPROP&shard=shard1&collection=collection1&replica=core_node1&property=preferredLeader&wt=xml
----
*Output*
@ -1607,9 +1616,9 @@ Either of these commands would put the "preferredLeader" property on one replica
[source,text]
----
http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collection=collection1&property=preferredLeader
http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collection=collection1&property=preferredLeader&wt=xml
http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collection=collection1&property=property.preferredLeader
http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collection=collection1&property=property.preferredLeader&wt=xml
----
*Output*
@ -1664,8 +1673,8 @@ Either of these commands would cause all the active replicas that had the `prefe
[source,text]
----
http://localhost:8983/solr/admin/collections?action=REBALANCELEADERS&collection=collection1
http://localhost:8983/solr/admin/collections?action=REBALANCELEADERS&collection=collection1&maxAtOnce=5&maxWaitSeconds=30
http://localhost:8983/solr/admin/collections?action=REBALANCELEADERS&collection=collection1&wt=xml
http://localhost:8983/solr/admin/collections?action=REBALANCELEADERS&collection=collection1&maxAtOnce=5&maxWaitSeconds=30&wt=xml
----
*Output*
@ -1917,7 +1926,7 @@ As of now, REQUESTSTATUS does not automatically clean up the tracking data struc
[source,text]
----
http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=collection1&shard=shard1&async=1000
http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=collection1&shard=shard1&async=1000&wt=xml
----
*Output*

View File

@ -66,7 +66,7 @@ Create a ConfigSet named 'myConfigSet' based on a 'predefinedTemplate' ConfigSet
[source,text]
----
http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet&baseConfigSet=predefinedTemplate&configSetProp.immutable=false
http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet&baseConfigSet=predefinedTemplate&configSetProp.immutable=false&wt=xml
----
*Output*
@ -105,7 +105,7 @@ Delete ConfigSet 'myConfigSet'
[source,text]
----
http://localhost:8983/solr/admin/configs?action=DELETE&name=myConfigSet
http://localhost:8983/solr/admin/configs?action=DELETE&name=myConfigSet&wt=xml
----
*Output*

View File

@ -143,7 +143,7 @@ Now do a distributed search across both servers with your browser or `curl.` In
+
[source,bash]
----
curl http://localhost:8983/solr/core1/select?q=*:*&indent=true&shards=localhost:8983/solr/core1,localhost:8984/solr/core1&fl=id,name
curl http://localhost:8983/solr/core1/select?q=*:*&indent=true&shards=localhost:8983/solr/core1,localhost:8984/solr/core1&fl=id,name&wt=xml
----
+
This should contain both the documents as shown below:

View File

@ -47,7 +47,7 @@ sort=div(popularity,price) desc, score desc
+
[source,text]
----
&fl=sum(x, y),id,a,b,c,score
&fl=sum(x, y),id,a,b,c,score&wt=xml
----
+
the output would be:
@ -531,7 +531,7 @@ http://localhost:8983/solr/collection_name/select?q=*:*&sort=dist(2, point1, poi
Sort by function also supports pseudo-fields: fields can be generated dynamically and return results as though it was normal field in the index. For example,
`&fl=id,sum(x, y),score`
`&fl=id,sum(x, y),score&wt=xml`
would return:

View File

@ -73,7 +73,7 @@ The `backup` operation can be monitored to see if it has completed by sending th
.Status API Example
[source,text]
----
http://localhost:8983/solr/gettingstarted/replication?command=details
http://localhost:8983/solr/gettingstarted/replication?command=details&wt=xml
----
.Output Snippet
@ -126,7 +126,7 @@ You can also check the status of a `restore` operation by sending the `restorest
.Status API Example
[source,text]
----
http://localhost:8983/solr/gettingstarted/replication?command=restorestatus
http://localhost:8983/solr/gettingstarted/replication?command=restorestatus&wt=xml
----
.Status API Output

View File

@ -64,7 +64,7 @@ The parameter `allParents` is a filter that matches *only parent documents*; her
The parameter `someParents` identifies a query that will match some of the parent documents. The output is the children.
Using the example documents above, we can construct a query such as `q={!child of="content_type:parentDocument"}title:lucene`. We only get one document in response:
Using the example documents above, we can construct a query such as `q={!child of="content_type:parentDocument"}title:lucene&wt=xml`. We only get one document in response:
[source,xml]
----
@ -110,7 +110,7 @@ child query must only match non-parent docs.
You can search for `q=+(parentFilter) +(someChildren)` to find a cause.
Again using the example documents above, we can construct a query such as `q={!parent which="content_type:parentDocument"}comments:SolrCloud`. We get this document in response:
Again using the example documents above, we can construct a query such as `q={!parent which="content_type:parentDocument"}comments:SolrCloud&wt=xml`. We get this document in response:
[source,xml]
----

View File

@ -44,7 +44,7 @@ This command will ping the core name for a response.
[source,text]
----
http://localhost:8983/solr/<collection-name>/admin/ping?distrib=true
http://localhost:8983/solr/<collection-name>/admin/ping?distrib=true&wt=xml
----
This command will ping all replicas of the given collection name for a response

View File

@ -55,7 +55,7 @@ bin/solr start -e techproducts -Dsolr.clustering.enabled=true
You can now try out the clustering handler by opening the following URL in a browser:
`\http://localhost:8983/solr/techproducts/clustering?q=*:*&rows=100`
`\http://localhost:8983/solr/techproducts/clustering?q=*:*&rows=100&wt=xml`
The output XML should include search hits and an array of automatically discovered clusters at the end, resembling the output shown here:

View File

@ -220,7 +220,7 @@ For example, adding a CSV document will cause unknown fields to be added, with f
[source,bash]
----
curl "http://localhost:8983/solr/gettingstarted/update?commit=true" -H "Content-type:application/csv" -d '
curl "http://localhost:8983/solr/gettingstarted/update?commit=true&wt=xml" -H "Content-type:application/csv" -d '
id,Artist,Album,Released,Rating,FromDistributor,Sold
44C,Old Shews,Mead for Walking,1988-08-13,0.01,14,0'
----
@ -303,7 +303,7 @@ Once a field has been added to the schema, its field type is fixed. As a consequ
[source,bash]
----
curl "http://localhost:8983/solr/gettingstarted/update?commit=true" -H "Content-type:application/csv" -d '
curl "http://localhost:8983/solr/gettingstarted/update?commit=true&wt=xml" -H "Content-type:application/csv" -d '
id,Description,Sold
19F,Cassettes by the pound,4.93'
----

View File

@ -249,7 +249,7 @@ For example, given a dictionary called `foo`, `spellcheck.foo.myKey=myValue` wou
Using Solr's `bin/solr -e techproducts` example, this query shows the results of a simple request that defines a query using the `spellcheck.q` parameter, and forces the collations to require all input terms must match:
`\http://localhost:8983/solr/techproducts/spell?df=text&spellcheck.q=delll+ultra+sharp&spellcheck=true&spellcheck.collateParam.q.op=AND`
`\http://localhost:8983/solr/techproducts/spell?df=text&spellcheck.q=delll+ultra+sharp&spellcheck=true&spellcheck.collateParam.q.op=AND&wt=xml`
Results:

View File

@ -50,7 +50,7 @@ This section presents examples of responses from the standard query parser.
The URL below submits a simple query and requests the XML Response Writer to use indentation to make the XML response more readable.
`\http://localhost:8983/solr/techproducts/select?q=id:SP2514N`
`\http://localhost:8983/solr/techproducts/select?q=id:SP2514N&wt=xml`
Results:
@ -77,7 +77,7 @@ Results:
Here's an example of a query with a limited field list.
`\http://localhost:8983/solr/techproducts/select?q=id:SP2514N&fl=id+name`
`\http://localhost:8983/solr/techproducts/select?q=id:SP2514N&fl=id+name&wt=xml`
Results:

View File

@ -163,7 +163,7 @@ Additional "Expert" local params are supported in some cases for affecting the b
Here we compute some statistics for the price field. The min, max, mean, 90th, and 99th percentile price values are computed against all products that are in stock (`q=*:*` and `fq=inStock:true`), and independently all of the default statistics are computed against all products regardless of whether they are in stock or not (by excluding that filter).
[source,text]
http://localhost:8983/solr/techproducts/select?q=*:*&fq={!tag=stock_check}inStock:true&stats=true&stats.field={!ex=stock_check+key=instock_prices+min=true+max=true+mean=true+percentiles='90,99'}price&stats.field={!key=all_prices}price&rows=0&indent=true
http://localhost:8983/solr/techproducts/select?q=*:*&fq={!tag=stock_check}inStock:true&stats=true&stats.field={!ex=stock_check+key=instock_prices+min=true+max=true+mean=true+percentiles='90,99'}price&stats.field={!key=all_prices}price&rows=0&indent=true&wt=xml
[source,xml]
----

View File

@ -54,7 +54,7 @@ Modifies every document to include the exact same value, as if it were a stored
[source,plain]
----
q=*:*&fl=id,greeting:[value v='hello']
q=*:*&fl=id,greeting:[value v='hello']&wt=xml
----
The above query would produce results like the following:

View File

@ -164,7 +164,7 @@ Short requests can also be sent using a HTTP GET command, if enabled in <<reques
[source,bash]
----
curl http://localhost:8983/solr/my_collection/update?stream.body=%3Ccommit/%3E
curl http://localhost:8983/solr/my_collection/update?stream.body=%3Ccommit/%3E&wt=xml
----
Responses from Solr take the form shown here:

View File

@ -118,7 +118,7 @@ For example, the following request will use range faceting to facet over the cur
[source,text]
----
http://localhost:8983/solr/my_collection/select?q=*:*&facet.range=my_date_field&facet=true&facet.range.start=NOW/MONTH&facet.range.end=NOW/MONTH%2B1MONTH&facet.range.gap=%2B1DAY
http://localhost:8983/solr/my_collection/select?q=*:*&facet.range=my_date_field&facet=true&facet.range.start=NOW/MONTH&facet.range.end=NOW/MONTH%2B1MONTH&facet.range.gap=%2B1DAY&wt=xml
----
[source,xml]
@ -137,7 +137,7 @@ While in this example, the "days" will be computed relative to the specified tim
[source,text]
----
http://localhost:8983/solr/my_collection/select?q=*:*&facet.range=my_date_field&facet=true&facet.range.start=NOW/MONTH&facet.range.end=NOW/MONTH%2B1MONTH&facet.range.gap=%2B1DAY&TZ=America/Los_Angeles
http://localhost:8983/solr/my_collection/select?q=*:*&facet.range=my_date_field&facet=true&facet.range.start=NOW/MONTH&facet.range.end=NOW/MONTH%2B1MONTH&facet.range.gap=%2B1DAY&TZ=America/Los_Angeles&wt=xml
----
[source,xml]