Browse Source

[DOCS] Updated the mapping and field mapping docs to use the new format

Closes #6057
Clinton Gormley 11 years ago
parent
commit
394a3e4332

+ 8 - 6
docs/reference/indices/get-field-mapping.asciidoc

@@ -9,7 +9,7 @@ The following returns the mapping of the field `text` only:
 
 [source,js]
 --------------------------------------------------
-curl -XGET 'http://localhost:9200/twitter/tweet/_mapping/field/text'
+curl -XGET 'http://localhost:9200/twitter/_mapping/tweet/field/text'
 --------------------------------------------------
 
 For which the response is (assuming `text` is a default string field):
@@ -46,9 +46,9 @@ following are some examples:
 --------------------------------------------------
 curl -XGET 'http://localhost:9200/twitter,kimchy/_mapping/field/message'
 
-curl -XGET 'http://localhost:9200/_all/tweet,book/_mapping/field/message,user.id'
+curl -XGET 'http://localhost:9200/_all/_mapping/tweet,book/field/message,user.id'
 
-curl -XGET 'http://localhost:9200/_all/tw*/_mapping/field/*.id'
+curl -XGET 'http://localhost:9200/_all/_mapping/tw*/field/*.id'
 --------------------------------------------------
 
 [float]
@@ -95,7 +95,7 @@ the field `author.name`:
 
 [source,js]
 --------------------------------------------------
-curl -XGET "http://localhost:9200/publications/article/_mapping/field/author.id,text,name"
+curl -XGET "http://localhost:9200/publications/_mapping/article/field/author.id,text,name"
 --------------------------------------------------
 
 returns:
@@ -136,5 +136,7 @@ This is useful when the request can refer to to multiple fields (like `text` abo
 === Other options
 
 [horizontal]
-include_defaults:: adding `include_defaults=true` to the query string will cause the response to
-include default values, which are normally suppressed.
+`include_defaults`::
+
+    adding `include_defaults=true` to the query string will cause the response
+    to include default values, which are normally suppressed.

+ 3 - 3
docs/reference/indices/get-mapping.asciidoc

@@ -6,7 +6,7 @@ index/type.
 
 [source,js]
 --------------------------------------------------
-curl -XGET 'http://localhost:9200/twitter/tweet/_mapping'
+curl -XGET 'http://localhost:9200/twitter/_mapping/tweet'
 --------------------------------------------------
 
 [float]
@@ -21,9 +21,9 @@ following are some examples:
 
 [source,js]
 --------------------------------------------------
-curl -XGET 'http://localhost:9200/twitter,kimchy/_mapping'
+curl -XGET 'http://localhost:9200/_mapping/twitter,kimchy'
 
-curl -XGET 'http://localhost:9200/_all/tweet,book/_mapping'
+curl -XGET 'http://localhost:9200/_all/_mapping/tweet,book'
 --------------------------------------------------
 
 If you want to get mappings of all indices and types then the following