You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2017/05/10 01:28:31 UTC
[3/3] lucene-solr:jira/solr-10290: use callouts instead of hackish
fake-comments
use callouts instead of hackish fake-comments
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7b235fec
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7b235fec
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7b235fec
Branch: refs/heads/jira/solr-10290
Commit: 7b235fec21c3492d275c1bb98b1edcabd52365d3
Parents: e00da43
Author: Chris Hostetter <ho...@apache.org>
Authored: Tue May 9 18:28:22 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Tue May 9 18:28:22 2017 -0700
----------------------------------------------------------------------
.../src/uploading-data-with-index-handlers.adoc | 28 +++++++++-----------
1 file changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7b235fec/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc b/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
index 777f9a3..79ab2d1 100644
--- a/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
+++ b/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
@@ -302,7 +302,7 @@ curl 'http://localhost:8983/solr/techproducts/update?commit=true' --data-binary
In general, the JSON update syntax supports all of the update commands that the XML update handler supports, through a straightforward mapping. Multiple commands, adding and deleting documents, may be contained in one message:
-[source,bash]
+[source,bash,subs="verbatim,callouts"]
----
curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/my_collection/update' --data-binary '
{
@@ -310,14 +310,14 @@ curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/my_
"doc": {
"id": "DOC1",
"my_field": 2.3,
- "my_multivalued_field": [ "aaa", "bbb" ] /* Can use an array for a multi-valued field */
+ "my_multivalued_field": [ "aaa", "bbb" ] --<1>
}
},
"add": {
- "commitWithin": 5000, /* commit this document within 5 seconds */
- "overwrite": false, /* don\'t check for existing documents with the same uniqueKey */
+ "commitWithin": 5000, --<2>
+ "overwrite": false, --<3>
"doc": {
- "f1": "v1", /* Can use repeated keys for a multi-valued field */
+ "f1": "v1", --<4>
"f1": "v2"
}
},
@@ -325,19 +325,17 @@ curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/my_
"commit": {},
"optimize": { "waitSearcher":false },
- "delete": { "id":"ID" }, /* delete by ID */
- "delete": { "query":"QUERY" } /* delete by query */
+ "delete": { "id":"ID" }, --<5>
+ "delete": { "query":"QUERY" } --<6>
}'
----
-[IMPORTANT]
-====
-
-Comments are not allowed in JSON, but duplicate names are.
-
-The comments in the above example are for illustrative purposes only, and can not be included in actual commands sent to Solr.
-
-====
+<1> Can use an array for a multi-valued field
+<2> Commit this document within 5 seconds
+<3> Don't check for existing documents with the same uniqueKey
+<4> Can use repeated keys for a multi-valued field
+<5> Delete by ID (uniqueKey field)
+<6> Delete by Query
As with other update handlers, parameters such as `commit`, `commitWithin`, `optimize`, and `overwrite` may be specified in the URL instead of in the body of the message.