Apache Solr open-source search software
SOLR-18491: Show the v2 API next to v1 on four Ref Guide pages (#4993)
Serhiy Bzhezytskyya343e01974a9
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/jwt-authentication-plugin.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/jwt-authentication-plugin.adocindex 40b5d5b5be2..f07f912a0e5 100644--- a/solr/solr-ref-guide/modules/deployment-guide/pages/jwt-authentication-plugin.adoc+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/jwt-authentication-plugin.adoc@@ -269,10 +269,26 @@ SolrJ does not currently support supplying JWT tokens per request.To authenticate with Solr when using the cURL utility, supply a valid JWT access token in an `Authorization` header, as follows (replace xxxxxx.xxxxxx.xxxxxx with your JWT compact token):+[tabs#jwt-curl-header]+======+V1 API::+++====[source,bash]----curl -H "Authorization: Bearer xxxxxx.xxxxxx.xxxxxx" http://localhost:8983/solr/admin/info/system----+====++V2 API::+++====+[source,bash]+----+curl -H "Authorization: Bearer xxxxxx.xxxxxx.xxxxxx" http://localhost:8983/api/node/system+----+====+========= Admin UIdiff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/solr-in-docker.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/solr-in-docker.adocindex 8012b18b0b0..d819053f401 100644--- a/solr/solr-ref-guide/modules/deployment-guide/pages/solr-in-docker.adoc+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/solr-in-docker.adoc@@ -162,10 +162,26 @@ docker run -e SOLR_HOST_ADVERTISE=solr1 --network docs_solr solr solr create -cThe fourth way is to use the remote API, from the host or from one of the containers, or some new container on the same network (adjust the hostname accordingly):+[tabs#docker-create-collection]+======+V1 API::+++====[source,bash]-----curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=gettingstarted3&numShards=1&collection.configName=_default'+curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=gettingstarted4&numShards=1&collection.configName=_default'----+====++V2 API::+++====+[source,bash]+----+curl http://localhost:8983/api/collections -H 'Content-Type: application/json' -d '{"name": "gettingstarted4", "numShards": 1, "config": "_default"}'+----+====+======If you want to use a custom configuration for your collection, you first need to upload it, and then refer to it by name when you create the collection.You can use the xref:solr-control-script-reference.adoc#upload-a-configuration-set[`bin/solr zk` command] or the xref:configuration-guide:configsets-api.adoc#configsets-upload[Configsets API].diff --git a/solr/solr-ref-guide/modules/indexing-guide/pages/schemaless-mode.adoc b/solr/solr-ref-guide/modules/indexing-guide/pages/schemaless-mode.adocindex a79dc8ca082..1a29a9722ab 100644--- a/solr/solr-ref-guide/modules/indexing-guide/pages/schemaless-mode.adoc+++ b/solr/solr-ref-guide/modules/indexing-guide/pages/schemaless-mode.adoc@@ -37,7 +37,30 @@ bin/solr start -e schemalessThis will launch a single Solr server, and automatically create a collection (named "```gettingstarted```") that contains only three fields in the initial schema: `id`, `\_version_`, and `\_text_`.-You can use the `/schema/fields` xref:schema-api.adoc[] to confirm this: `curl \http://localhost:8983/solr/gettingstarted/schema/fields` will output:+You can use the `/schema/fields` xref:schema-api.adoc[] to confirm this:++[tabs#schemaless-fields-initial]+======+V1 API::+++====+[source,bash]+----+curl http://localhost:8983/solr/gettingstarted/schema/fields+----+====++V2 API::+++====+[source,bash]+----+curl http://localhost:8983/api/collections/gettingstarted/schema/fields+----+====+======++The output will be:[source,json]----@@ -246,7 +269,30 @@ Output indicating success:</response>-----The fields now in the schema (output from `curl \http://localhost:8983/solr/gettingstarted/schema/fields` ):+To see the fields now in the schema:++[tabs#schemaless-fields-after]+======+V1 API::+++====+[source,bash]+----+curl http://localhost:8983/solr/gettingstarted/schema/fields+----+====++V2 API::+++====+[source,bash]+----+curl http://localhost:8983/api/collections/gettingstarted/schema/fields+----+====+======++The output is:[source,json]----@@ -283,7 +329,30 @@ The fields now in the schema (output from `curl \http://localhost:8983/solr/gett]}-----In addition string versions of the text fields are indexed, using copyFields to a `*_str` dynamic field: (output from `curl \http://localhost:8983/solr/gettingstarted/schema/copyfields` ):+In addition string versions of the text fields are indexed, using copyFields to a `*_str` dynamic field. To see them:++[tabs#schemaless-copyfields]+======+V1 API::+++====+[source,bash]+----+curl http://localhost:8983/solr/gettingstarted/schema/copyfields+----+====++V2 API::+++====+[source,bash]+----+curl http://localhost:8983/api/collections/gettingstarted/schema/copyfields+----+====+======++The output is:[source,json]----diff --git a/solr/solr-ref-guide/modules/query-guide/pages/exporting-result-sets.adoc b/solr/solr-ref-guide/modules/query-guide/pages/exporting-result-sets.adocindex fc6f4d6a7ef..d870f56f961 100644--- a/solr/solr-ref-guide/modules/query-guide/pages/exporting-result-sets.adoc+++ b/solr/solr-ref-guide/modules/query-guide/pages/exporting-result-sets.adoc@@ -58,10 +58,26 @@ The default output format is `json`.Here is an example of an export request of some indexed log data:+[tabs#export-basic]+======+V1 API::+++====[source,text]-----http://localhost:8983/solr/core_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg+http://localhost:8983/solr/collection_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg----+====++V2 API::+++====+[source,text]+----+http://localhost:8983/api/collections/collection_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg+----+====+========= Specifying the Sort Criteria@@ -100,20 +116,53 @@ Only stream xref:stream-decorator-reference.adoc[decorators] and xref:stream-evaUsing stream expressions with the `/export` handler may result in dramatic performance improvements due to the local in-memory reduction of the number of documents to be returned.Here's an example of using `top` decorator for returning only top N results:++[tabs#export-top]+======+V1 API::+++====[source,text]-----http://localhost:8983/solr/core_name/export?q=my-query&sort=timestamp+desc,&fl=timestamp,reporter,severity&expr=top(n=2,input(),sort="timestamp+desc")+http://localhost:8983/solr/collection_name/export?q=my-query&sort=timestamp+desc,&fl=timestamp,reporter,severity&expr=top(n=2,input(),sort="timestamp+desc")----+====++V2 API::+++====+[source,text]+----+http://localhost:8983/api/collections/collection_name/export?q=my-query&sort=timestamp+desc,&fl=timestamp,reporter,severity&expr=top(n=2,input(),sort="timestamp+desc")+----+====+======(Note that the sort spec in the `top` decorator must match the sort spec in thehandler parameter).Here's an example of using `unique` decorator:+[tabs#export-unique]+======+V1 API::+++====+[source,text]+----+http://localhost:8983/solr/collection_name/export?q=my-query&sort=reporter+desc,&fl=reporter&expr=unique(input(),over="reporter")+----+====++V2 API::+++====[source,text]-----http://localhost:8983/solr/core_name/export?q=my-query&sort=reporter+desc,&fl=reporter&expr=unique(input(),over="reporter")+http://localhost:8983/api/collections/collection_name/export?q=my-query&sort=reporter+desc,&fl=reporter&expr=unique(input(),over="reporter")----+====+======(Note that the `over` parameter must use one of the fields requested in the `fl` parameter).