You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2018/01/07 18:45:22 UTC
lucene-solr:branch_7x: SOLR-11819: The schema api reference manual
page should not use hyphens in the example field name
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x db5d2d407 -> 1068ed892
SOLR-11819: The schema api reference manual page should not use hyphens in the example field name
(cherry picked from commit 1f09d5b)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1068ed89
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1068ed89
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1068ed89
Branch: refs/heads/branch_7x
Commit: 1068ed892a0ce97a13ccdf55e74e9d5c768beabf
Parents: db5d2d4
Author: Erick Erickson <er...@apache.org>
Authored: Sat Jan 6 20:25:14 2018 -0800
Committer: Erick Erickson <er...@apache.org>
Committed: Sun Jan 7 10:45:01 2018 -0800
----------------------------------------------------------------------
solr/solr-ref-guide/src/schema-api.adoc | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1068ed89/solr/solr-ref-guide/src/schema-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/schema-api.adoc b/solr/solr-ref-guide/src/schema-api.adoc
index f1ef1a4..7a61857 100644
--- a/solr/solr-ref-guide/src/schema-api.adoc
+++ b/solr/solr-ref-guide/src/schema-api.adoc
@@ -97,7 +97,7 @@ The `add-field` command adds a new field definition to your schema. If a field w
All of the properties available when defining a field with manual `schema.xml` edits can be passed via the API. These request attributes are described in detail in the section <<defining-fields.adoc#defining-fields,Defining Fields>>.
-For example, to define a new stored field named "sell-by", of type "pdate", you would POST the following request:
+For example, to define a new stored field named "sell_by", of type "pdate", you would POST the following request:
[.dynamic-tabs]
--
@@ -108,7 +108,7 @@ For example, to define a new stored field named "sell-by", of type "pdate", you
----
curl -X POST -H 'Content-type:application/json' --data-binary '{
"add-field":{
- "name":"sell-by",
+ "name":"sell_by",
"type":"pdate",
"stored":true }
}' http://localhost:8983/solr/gettingstarted/schema
@@ -122,7 +122,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{
----
curl -X POST -H 'Content-type:application/json' --data-binary '{
"add-field":{
- "name":"sell-by",
+ "name":"sell_by",
"type":"pdate",
"stored":true }
}' http://localhost:8983/api/cores/gettingstarted/schema
@@ -134,7 +134,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{
The `delete-field` command removes a field definition from your schema. If the field does not exist in the schema, or if the field is the source or destination of a copy field rule, an error is thrown.
-For example, to delete a field named "sell-by", you would POST the following request:
+For example, to delete a field named "sell_by", you would POST the following request:
[.dynamic-tabs]
--
@@ -144,7 +144,7 @@ For example, to delete a field named "sell-by", you would POST the following req
[source,bash]
----
curl -X POST -H 'Content-type:application/json' --data-binary '{
- "delete-field" : { "name":"sell-by" }
+ "delete-field" : { "name":"sell_by" }
}' http://localhost:8983/solr/gettingstarted/schema
----
====
@@ -155,7 +155,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{
[source,bash]
----
curl -X POST -H 'Content-type:application/json' --data-binary '{
- "delete-field" : { "name":"sell-by" }
+ "delete-field" : { "name":"sell_by" }
}' http://localhost:8983/api/cores/gettingstarted/schema
----
====
@@ -167,7 +167,7 @@ The `replace-field` command replaces a field's definition. Note that you must su
All of the properties available when defining a field with manual `schema.xml` edits can be passed via the API. These request attributes are described in detail in the section <<defining-fields.adoc#defining-fields,Defining Fields>>.
-For example, to replace the definition of an existing field "sell-by", to make it be of type "date" and to not be stored, you would POST the following request:
+For example, to replace the definition of an existing field "sell_by", to make it be of type "date" and to not be stored, you would POST the following request:
[.dynamic-tabs]
--
@@ -178,7 +178,7 @@ For example, to replace the definition of an existing field "sell-by", to make i
----
curl -X POST -H 'Content-type:application/json' --data-binary '{
"replace-field":{
- "name":"sell-by",
+ "name":"sell_by",
"type":"date",
"stored":false }
}' http://localhost:8983/solr/gettingstarted/schema
@@ -192,7 +192,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{
----
curl -X POST -H 'Content-type:application/json' --data-binary '{
"replace-field":{
- "name":"sell-by",
+ "name":"sell_by",
"type":"date",
"stored":false }
}' http://localhost:8983/api/cores/gettingstarted/schema
@@ -572,7 +572,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{
"class":"solr.WordDelimiterFilterFactory",
"preserveOriginal":"0" }]}},
"add-field" : {
- "name":"sell-by",
+ "name":"sell_by",
"type":"myNewTxtField",
"stored":true }
}' http://localhost:8983/solr/gettingstarted/schema