浏览代码

[DOCS] Replace `twitter` dataset in docs (#60604)

James Rodewig 5 年之前
父节点
当前提交
ae01606785
共有 34 个文件被更改,包括 151 次插入117 次删除
  1. 2 2
      docs/reference/cluster/health.asciidoc
  2. 1 1
      docs/reference/cluster/stats.asciidoc
  3. 1 1
      docs/reference/commands/shard-tool.asciidoc
  4. 2 2
      docs/reference/docs/delete.asciidoc
  5. 4 4
      docs/reference/eql/eql-search-api.asciidoc
  6. 8 8
      docs/reference/frozen-indices.asciidoc
  7. 2 2
      docs/reference/index-modules/blocks.asciidoc
  8. 2 2
      docs/reference/index-modules/index-sorting.asciidoc
  9. 4 4
      docs/reference/index-modules/slowlog.asciidoc
  10. 9 5
      docs/reference/indices/aliases.asciidoc
  11. 1 1
      docs/reference/indices/component-templates.asciidoc
  12. 1 1
      docs/reference/indices/create-index.asciidoc
  13. 1 1
      docs/reference/indices/put-component-template.asciidoc
  14. 1 1
      docs/reference/indices/put-index-template-v1.asciidoc
  15. 1 1
      docs/reference/indices/put-index-template.asciidoc
  16. 1 1
      docs/reference/mapping/fields/source-field.asciidoc
  17. 3 3
      docs/reference/modules/cluster/disk_allocator.asciidoc
  18. 53 25
      docs/reference/modules/cross-cluster-search.asciidoc
  19. 2 2
      docs/reference/modules/indices/request_cache.asciidoc
  20. 4 4
      docs/reference/query-dsl/bool-query.asciidoc
  21. 1 1
      docs/reference/query-dsl/constant-score-query.asciidoc
  22. 2 2
      docs/reference/query-dsl/exists-query.asciidoc
  23. 8 8
      docs/reference/query-dsl/function-score-query.asciidoc
  24. 2 2
      docs/reference/query-dsl/prefix-query.asciidoc
  25. 3 3
      docs/reference/query-dsl/query-string-syntax.asciidoc
  26. 2 2
      docs/reference/query-dsl/regexp-query.asciidoc
  27. 1 1
      docs/reference/query-dsl/span-first-query.asciidoc
  28. 3 3
      docs/reference/query-dsl/span-term-query.asciidoc
  29. 2 2
      docs/reference/query-dsl/term-query.asciidoc
  30. 3 3
      docs/reference/query-dsl/terms-query.asciidoc
  31. 2 2
      docs/reference/query-dsl/wildcard-query.asciidoc
  32. 2 2
      docs/reference/query-dsl/wrapper-query.asciidoc
  33. 3 3
      docs/reference/scripting/using.asciidoc
  34. 14 12
      docs/reference/search.asciidoc

+ 2 - 2
docs/reference/cluster/health.asciidoc

@@ -184,6 +184,6 @@ The following is an example of getting the cluster health at the
 
 [source,console]
 --------------------------------------------------
-GET /_cluster/health/twitter?level=shards
+GET /_cluster/health/my-index-000001?level=shards
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]

+ 1 - 1
docs/reference/cluster/stats.asciidoc

@@ -1100,7 +1100,7 @@ Number of selected nodes using the distribution flavor and file type.
 --------------------------------------------------
 GET /_cluster/stats?human&pretty
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 The API returns the following response:
 

+ 1 - 1
docs/reference/commands/shard-tool.asciidoc

@@ -57,7 +57,7 @@ operation that removes corrupted data from the shard.
 
 [source,txt]
 --------------------------------------------------
-$ bin/elasticsearch-shard remove-corrupted-data --index twitter --shard-id 0
+$ bin/elasticsearch-shard remove-corrupted-data --index my-index-000001 --shard-id 0
 
 
     WARNING: Elasticsearch MUST be stopped before running this tool.

+ 2 - 2
docs/reference/docs/delete.asciidoc

@@ -63,7 +63,7 @@ Example to delete with routing
 
 [source,console]
 --------------------------------------------------
-PUT /my-index-000001/_doc/1?routing=kimchy
+PUT /my-index-000001/_doc/1?routing=shard-1
 {
   "test": "test"
 }
@@ -73,7 +73,7 @@ PUT /my-index-000001/_doc/1?routing=kimchy
 
 [source,console]
 --------------------------------------------------
-DELETE /my-index-000001/_doc/1?routing=kimchy
+DELETE /my-index-000001/_doc/1?routing=shard-1
 --------------------------------------------------
 // TEST[continued]
 

+ 4 - 4
docs/reference/eql/eql-search-api.asciidoc

@@ -506,14 +506,14 @@ The following EQL search request searches for events with an `event.category` of
 `file` that meet the following conditions:
 
 * A `file.name` of `cmd.exe`
-* An `agent.id` other than `my_user`
+* An `agent.id` other than `8a4f526c`
 
 [source,console]
 ----
 GET /my-index-000001/_eql/search
 {
   "query": """
-    file where (file.name == "cmd.exe" and agent.id != "my_user")
+    file where (file.name == "cmd.exe" and agent.id != "8a4f526c")
   """
 }
 ----
@@ -614,7 +614,7 @@ that:
 --
 * An `event.category` of `file`
 * A `file.name` of `cmd.exe`
-* An `agent.id` other than `my_user`
+* An `agent.id` other than `8a4f526c`
 --
 . Followed by an event with:
 +
@@ -631,7 +631,7 @@ GET /my-index-000001/_eql/search
 {
   "query": """
     sequence by agent.id
-      [ file where file.name == "cmd.exe" and agent.id != "my_user" ]
+      [ file where file.name == "cmd.exe" and agent.id != "8a4f526c" ]
       [ process where stringContains(process.executable, "regsvr32") ]
   """
 }

+ 8 - 8
docs/reference/frozen-indices.asciidoc

@@ -64,9 +64,9 @@ or sorted search requests.
 
 [source,console]
 --------------------------------------------------
-POST /twitter/_forcemerge?max_num_segments=1
+POST /my-index-000001/_forcemerge?max_num_segments=1
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 [role="xpack"]
 [testenv="basic"]
@@ -81,9 +81,9 @@ the query parameter `ignore_throttled=false`.
 
 [source,console]
 --------------------------------------------------
-GET /twitter/_search?q=user:kimchy&ignore_throttled=false
+GET /my-index-000001/_search?q=user.id:kimchy&ignore_throttled=false
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 [role="xpack"]
 [testenv="basic"]
@@ -95,16 +95,16 @@ Frozen indices are ordinary indices that use search throttling and a memory effi
 
 [source,console]
 --------------------------------------------------
-GET /_cat/indices/twitter?v&h=i,sth
+GET /_cat/indices/my-index-000001?v&h=i,sth
 --------------------------------------------------
-// TEST[s/^/PUT twitter\nPOST twitter\/_freeze\n/]
+// TEST[s/^/PUT my-index-000001\nPOST my-index-000001\/_freeze\n/]
 
 The response looks like:
 
 [source,txt]
 --------------------------------------------------
-i         sth
-twitter   true
+i                 sth
+my-index-000001   true
 --------------------------------------------------
 // TESTRESPONSE[non_json]
 

+ 2 - 2
docs/reference/index-modules/blocks.asciidoc

@@ -74,9 +74,9 @@ Adds an index block to an index.
 
 [source,console]
 --------------------------------------------------
-PUT /twitter/_block/write
+PUT /my-index-000001/_block/write
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 
 [discrete]

+ 2 - 2
docs/reference/index-modules/index-sorting.asciidoc

@@ -14,7 +14,7 @@ For instance the following example shows how to define a sort on a single field:
 
 [source,console]
 --------------------------------------------------
-PUT twitter
+PUT my-index-000001
 {
   "settings": {
     "index": {
@@ -39,7 +39,7 @@ It is also possible to sort the index by more than one field:
 
 [source,console]
 --------------------------------------------------
-PUT twitter
+PUT my-index-000001
 {
   "settings": {
     "index": {

+ 4 - 4
docs/reference/index-modules/slowlog.asciidoc

@@ -29,7 +29,7 @@ All of the above settings are _dynamic_ and can be set for each index using the
 
 [source,console]
 --------------------------------------------------
-PUT /twitter/_settings
+PUT /my-index-000001/_settings
 {
   "index.search.slowlog.threshold.query.warn": "10s",
   "index.search.slowlog.threshold.query.info": "5s",
@@ -41,7 +41,7 @@ PUT /twitter/_settings
   "index.search.slowlog.threshold.fetch.trace": "200ms"
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 By default thresholds are disabled (set to `-1`).
 
@@ -108,7 +108,7 @@ All of the above settings are _dynamic_ and can be set for each index using the
 
 [source,console]
 --------------------------------------------------
-PUT /twitter/_settings
+PUT /my-index-000001/_settings
 {
   "index.indexing.slowlog.threshold.index.warn": "10s",
   "index.indexing.slowlog.threshold.index.info": "5s",
@@ -117,7 +117,7 @@ PUT /twitter/_settings
   "index.indexing.slowlog.source": "1000"
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 By default Elasticsearch will log the first 1000 characters of the _source in
 the slowlog. You can change that with `index.indexing.slowlog.source`. Setting

+ 9 - 5
docs/reference/indices/aliases.asciidoc

@@ -302,19 +302,23 @@ exist in the mapping:
 
 [source,console]
 --------------------------------------------------
-PUT /test1
+PUT /my-index-000001
 {
   "mappings": {
     "properties": {
-      "user" : {
-        "type": "keyword"
+      "user": {
+        "properties": {
+          "id": {
+            "type": "keyword"
+          }
+        }
       }
     }
   }
 }
 --------------------------------------------------
 
-Now we can create an alias that uses a filter on field `user`:
+Now we can create an alias that uses a filter on field `user.id`:
 
 [source,console]
 --------------------------------------------------
@@ -323,7 +327,7 @@ POST /_aliases
   "actions": [
     {
       "add": {
-        "index": "test1",
+        "index": "my-index-000001",
         "alias": "alias2",
         "filter": { "term": { "user.id": "kimchy" } }
       }

+ 1 - 1
docs/reference/indices/component-templates.asciidoc

@@ -141,7 +141,7 @@ PUT _component_template/template_1
             "filter" : {
                 "term" : {"user.id" : "kimchy" }
             },
-            "routing" : "kimchy"
+            "routing" : "shard-1"
         },
         "{index}-alias" : {} <1>
     }

+ 1 - 1
docs/reference/indices/create-index.asciidoc

@@ -149,7 +149,7 @@ PUT /test
       "filter": {
         "term": { "user.id": "kimchy" }
       },
-      "routing": "kimchy"
+      "routing": "shard-1"
     }
   }
 }

+ 1 - 1
docs/reference/indices/put-component-template.asciidoc

@@ -138,7 +138,7 @@ PUT _component_template/template_1
             "filter" : {
                 "term" : {"user.id" : "kimchy" }
             },
-            "routing" : "kimchy"
+            "routing" : "shard-1"
         },
         "{index}-alias" : {} <1>
     }

+ 1 - 1
docs/reference/indices/put-index-template-v1.asciidoc

@@ -152,7 +152,7 @@ PUT _template/template_1
       "filter" : {
         "term" : {"user.id" : "kimchy" }
       },
-      "routing" : "kimchy"
+      "routing" : "shard-1"
     },
     "{index}-alias" : {} <1>
   }

+ 1 - 1
docs/reference/indices/put-index-template.asciidoc

@@ -155,7 +155,7 @@ PUT _index_template/template_1
             "filter" : {
                 "term" : {"user.id" : "kimchy" }
             },
-            "routing" : "kimchy"
+            "routing" : "shard-1"
         },
         "{index}-alias" : {} <1>
     }

+ 1 - 1
docs/reference/mapping/fields/source-field.asciidoc

@@ -14,7 +14,7 @@ within the index. For this reason, it can be disabled as follows:
 
 [source,console]
 --------------------------------------------------
-PUT tweets
+PUT my-index-000001
 {
   "mappings": {
     "_source": {

+ 3 - 3
docs/reference/modules/cluster/disk_allocator.asciidoc

@@ -51,16 +51,16 @@ Controls the flood stage watermark, which defaults to 95%. {es} enforces a read-
 NOTE: You cannot mix the usage of percentage values and byte values within
 these settings. Either all values are set to percentage values, or all are set to byte values. This enforcement is so that {es} can validate that the settings are internally consistent, ensuring that the low disk threshold is less than the high disk threshold, and the high disk threshold is less than the flood stage threshold.
 
-An example of resetting the read-only index block on the `twitter` index:
+An example of resetting the read-only index block on the `my-index-000001` index:
 
 [source,console]
 --------------------------------------------------
-PUT /twitter/_settings
+PUT /my-index-000001/_settings
 {
   "index.blocks.read_only_allow_delete": null
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 --
 // end::cluster-routing-flood-stage-tag[]
 

+ 53 - 25
docs/reference/modules/cross-cluster-search.asciidoc

@@ -66,22 +66,22 @@ PUT _cluster/settings
 ==== Search a single remote cluster
 
 The following <<search-search,search>> API request searches the
-`twitter` index on a single remote cluster, `cluster_one`.
+`my-index-000001` index on a single remote cluster, `cluster_one`.
 
 [source,console]
 --------------------------------------------------
-GET /cluster_one:twitter/_search
+GET /cluster_one:my-index-000001/_search
 {
   "query": {
     "match": {
-      "user": "kimchy"
+      "user.id": "kimchy"
     }
   },
-  "_source": ["user", "message", "likes"]
+  "_source": ["user.id", "message", "http.response.status_code"]
 }
 --------------------------------------------------
 // TEST[continued]
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 The API returns the following response:
 
@@ -109,13 +109,20 @@ The API returns the following response:
     "max_score": 1,
     "hits": [
       {
-        "_index": "cluster_one:twitter", <1>
+        "_index": "cluster_one:my-index-000001", <1>
         "_id": "0",
         "_score": 1,
         "_source": {
-          "user": "kimchy",
-          "message": "trying out Elasticsearch",
-          "likes": 0
+          "user": {
+            "id": "kimchy"
+          },
+          "message": "GET /search HTTP/1.1 200 1070000",
+          "http": {
+            "response":
+              {
+                "status_code": 200
+              }
+          }
         }
       }
     ]
@@ -133,7 +140,7 @@ The API returns the following response:
 [[ccs-search-multi-remote-cluster]]
 ==== Search multiple remote clusters
 
-The following <<search,search>> API request searches the `twitter` index on
+The following <<search,search>> API request searches the `my-index-000001` index on
 three clusters:
 
 * Your local cluster
@@ -141,14 +148,14 @@ three clusters:
 
 [source,console]
 --------------------------------------------------
-GET /twitter,cluster_one:twitter,cluster_two:twitter/_search
+GET /my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001/_search
 {
   "query": {
     "match": {
-      "user": "kimchy"
+      "user.id": "kimchy"
     }
   },
-  "_source": ["user", "message", "likes"]
+  "_source": ["user.id", "message", "http.response.status_code"]
 }
 --------------------------------------------------
 // TEST[continued]
@@ -180,33 +187,54 @@ The API returns the following response:
     "max_score": 1,
     "hits": [
       {
-        "_index": "twitter", <1>
+        "_index": "my-index-000001", <1>
         "_id": "0",
         "_score": 2,
         "_source": {
-          "user": "kimchy",
-          "message": "trying out Elasticsearch",
-          "likes": 0
+          "user": {
+            "id": "kimchy"
+          },
+          "message": "GET /search HTTP/1.1 200 1070000",
+          "http": {
+            "response":
+              {
+                "status_code": 200
+              }
+          }
         }
       },
       {
-        "_index": "cluster_one:twitter", <2>
+        "_index": "cluster_one:my-index-000001", <2>
         "_id": "0",
         "_score": 1,
         "_source": {
-          "user": "kimchy",
-          "message": "trying out Elasticsearch",
-          "likes": 0
+          "user": {
+            "id": "kimchy"
+          },
+          "message": "GET /search HTTP/1.1 200 1070000",
+          "http": {
+            "response":
+              {
+                "status_code": 200
+              }
+          }
         }
       },
       {
-        "_index": "cluster_two:twitter", <3>
+        "_index": "cluster_two:my-index-000001", <3>
         "_id": "0",
         "_score": 1,
         "_source": {
-          "user": "kimchy",
-          "message": "trying out Elasticsearch",
-          "likes": 0
+          "user": {
+            "id": "kimchy"
+          },
+          "message": "GET /search HTTP/1.1 200 1070000",
+          "http": {
+            "response":
+              {
+                "status_code": 200
+              }
+          }
         }
       }
     ]

+ 2 - 2
docs/reference/modules/indices/request_cache.asciidoc

@@ -45,9 +45,9 @@ The cache can be expired manually with the <<indices-clearcache,`clear-cache` AP
 
 [source,console]
 ------------------------
-POST /kimchy,elasticsearch/_cache/clear?request=true
+POST /my-index-000001,my-index-000002/_cache/clear?request=true
 ------------------------
-// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
+// TEST[s/^/PUT my-index-000001\nPUT my-index-000002\n/]
 
 [discrete]
 ==== Enabling and disabling caching

+ 4 - 4
docs/reference/query-dsl/bool-query.asciidoc

@@ -39,10 +39,10 @@ POST _search
   "query": {
     "bool" : {
       "must" : {
-        "term" : { "user" : "kimchy" }
+        "term" : { "user.id" : "kimchy" }
       },
       "filter": {
-        "term" : { "tag" : "tech" }
+        "term" : { "tags" : "production" }
       },
       "must_not" : {
         "range" : {
@@ -50,8 +50,8 @@ POST _search
         }
       },
       "should" : [
-        { "term" : { "tag" : "wow" } },
-        { "term" : { "tag" : "elasticsearch" } }
+        { "term" : { "tags" : "env1" } },
+        { "term" : { "tags" : "deployed" } }
       ],
       "minimum_should_match" : 1,
       "boost" : 1.0

+ 1 - 1
docs/reference/query-dsl/constant-score-query.asciidoc

@@ -15,7 +15,7 @@ GET /_search
   "query": {
     "constant_score": {
       "filter": {
-        "term": { "user": "kimchy" }
+        "term": { "user.id": "kimchy" }
       },
       "boost": 1.2
     }

+ 2 - 2
docs/reference/query-dsl/exists-query.asciidoc

@@ -50,7 +50,7 @@ use the `must_not` <<query-dsl-bool-query, boolean query>> with the `exists`
 query.
 
 The following search returns documents that are missing an indexed value for
-the `user` field.
+the `user.id` field.
 
 [source,console]
 ----
@@ -60,7 +60,7 @@ GET /_search
     "bool": {
       "must_not": {
         "exists": {
-          "field": "user"
+          "field": "user.id"
         }
       }
     }

+ 8 - 8
docs/reference/query-dsl/function-score-query.asciidoc

@@ -29,7 +29,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 <1> See <<score-functions>> for a list of supported functions.
 
@@ -64,7 +64,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 <1> Boost for the whole query.
 <2> See <<score-functions>> for a list of supported functions.
@@ -151,7 +151,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 [IMPORTANT]
 ====
@@ -193,7 +193,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 Note that unlike the `custom_score` query, the
 score of the query is multiplied with the result of the script scoring. If
@@ -251,7 +251,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 [[function-field-value-factor]]
 ==== Field Value factor
@@ -281,7 +281,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 Which will translate into the following formula for scoring:
 
@@ -383,7 +383,7 @@ GET /_search
   "query": {
     "function_score": {
       "gauss": {
-        "date": {
+        "@timestamp": {
           "origin": "2013-09-17", <1>
           "scale": "10d",
           "offset": "5d",         <2>
@@ -394,7 +394,7 @@ GET /_search
   }
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 <1> The date format of the origin depends on the <<mapping-date-format,`format`>> defined in
     your mapping. If you do not define the origin, the current time is used.

+ 2 - 2
docs/reference/query-dsl/prefix-query.asciidoc

@@ -9,7 +9,7 @@ Returns documents that contain a specific prefix in a provided field.
 [[prefix-query-ex-request]]
 ==== Example request
 
-The following search returns documents where the `user` field contains a term
+The following search returns documents where the `user.id` field contains a term
 that begins with `ki`.
 
 [source,console]
@@ -18,7 +18,7 @@ GET /_search
 {
   "query": {
     "prefix": {
-      "user": {
+      "user.id": {
         "value": "ki"
       }
     }

+ 3 - 3
docs/reference/query-dsl/query-string-syntax.asciidoc

@@ -292,17 +292,17 @@ need to write your query as `\(1\+1\)\=2`. When using JSON for the request body,
 
 [source,console]
 ----
-GET /twitter/_search
+GET /my-index-000001/_search
 {
   "query" : {
     "query_string" : {
       "query" : "kimchy\\!",
-      "fields"  : ["user"]
+      "fields"  : ["user.id"]
     }
   }
 }
 ----
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 The reserved characters are:  `+ - = && || > < ! ( ) { } [ ] ^ " ~ * ? : \ /`
 

+ 2 - 2
docs/reference/query-dsl/regexp-query.asciidoc

@@ -14,7 +14,7 @@ characters, called operators. For a list of operators supported by the
 [[regexp-query-ex-request]]
 ==== Example request
 
-The following search returns documents where the `user` field contains any term
+The following search returns documents where the `user.id` field contains any term
 that begins with `k` and ends with `y`. The `.*` operators match any
 characters of any length, including no characters. Matching
 terms can include `ky`, `kay`, and `kimchy`.
@@ -25,7 +25,7 @@ GET /_search
 {
   "query": {
     "regexp": {
-      "user": {
+      "user.id": {
         "value": "k.*y",
         "flags": "ALL",
         "max_determinized_states": 10000,

+ 1 - 1
docs/reference/query-dsl/span-first-query.asciidoc

@@ -14,7 +14,7 @@ GET /_search
   "query": {
     "span_first": {
       "match": {
-        "span_term": { "user": "kimchy" }
+        "span_term": { "user.id": "kimchy" }
       },
       "end": 3
     }

+ 3 - 3
docs/reference/query-dsl/span-term-query.asciidoc

@@ -12,7 +12,7 @@ Matches spans containing a term. The span term query maps to Lucene
 GET /_search
 {
   "query": {
-    "span_term" : { "user" : "kimchy" }
+    "span_term" : { "user.id" : "kimchy" }
   }
 }    
 --------------------------------------------------
@@ -24,7 +24,7 @@ A boost can also be associated with the query:
 GET /_search
 {
   "query": {
-    "span_term" : { "user" : { "value" : "kimchy", "boost" : 2.0 } }
+    "span_term" : { "user.id" : { "value" : "kimchy", "boost" : 2.0 } }
   }
 }    
 --------------------------------------------------
@@ -36,7 +36,7 @@ Or :
 GET /_search
 {
   "query": {
-    "span_term" : { "user" : { "term" : "kimchy", "boost" : 2.0 } }
+    "span_term" : { "user.id" : { "term" : "kimchy", "boost" : 2.0 } }
   }
 }    
 --------------------------------------------------

+ 2 - 2
docs/reference/query-dsl/term-query.asciidoc

@@ -30,8 +30,8 @@ GET /_search
 {
   "query": {
     "term": {
-      "user": {
-        "value": "Kimchy",
+      "user.id": {
+        "value": "kimchy",
         "boost": 1.0
       }
     }

+ 3 - 3
docs/reference/query-dsl/terms-query.asciidoc

@@ -12,8 +12,8 @@ except you can search for multiple values.
 [[terms-query-ex-request]]
 ==== Example request
 
-The following search returns documents where the `user` field contains `kimchy`
-or `elasticsearch`.
+The following search returns documents where the `user.id` field contains `kimchy`
+or `elkbee`.
 
 [source,console]
 ----
@@ -21,7 +21,7 @@ GET /_search
 {
   "query": {
     "terms": {
-      "user": [ "kimchy", "elasticsearch" ],
+      "user.id": [ "kimchy", "elkbee" ],
       "boost": 1.0
     }
   }

+ 2 - 2
docs/reference/query-dsl/wildcard-query.asciidoc

@@ -13,7 +13,7 @@ combine wildcard operators with other characters to create a wildcard pattern.
 [[wildcard-query-ex-request]]
 ==== Example request
 
-The following search returns documents where the `user` field contains a term
+The following search returns documents where the `user.id` field contains a term
 that begins with `ki` and ends with `y`. These matching terms can include `kiy`,
 `kity`, or `kimchy`.
 
@@ -23,7 +23,7 @@ GET /_search
 {
   "query": {
     "wildcard": {
-      "user": {
+      "user.id": {
         "value": "ki*y",
         "boost": 1.0,
         "rewrite": "constant_score"

+ 2 - 2
docs/reference/query-dsl/wrapper-query.asciidoc

@@ -12,13 +12,13 @@ GET /_search
 {
   "query": {
     "wrapper": {
-      "query": "eyJ0ZXJtIiA6IHsgInVzZXIiIDogIktpbWNoeSIgfX0=" <1>
+      "query": "eyJ0ZXJtIiA6IHsgInVzZXIuaWQiIDogImtpbWNoeSIgfX0=" <1>
     }
   }
 }
 --------------------------------------------------
 
-<1> Base64 encoded string:  `{"term" : { "user" : "Kimchy" }}`
+<1> Base64 encoded string:  `{"term" : { "user.id" : "kimchy" }}`
 
 This query is more useful in the context of the Java high-level REST client or
 transport client to also accept queries as json formatted string.

+ 3 - 3
docs/reference/scripting/using.asciidoc

@@ -163,7 +163,7 @@ POST _scripts/calculate-score
   }
 }
 -----------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 You may also specify a context as part of the url path to compile a
 stored script against that specific context in the form of
@@ -179,7 +179,7 @@ POST _scripts/calculate-score/score
   }
 }
 -----------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 This same script can be retrieved with:
 
@@ -193,7 +193,7 @@ Stored scripts can be used by specifying the `id` parameters as follows:
 
 [source,console]
 --------------------------------------------------
-GET twitter/_search
+GET my-index-000001/_search
 {
   "query": {
     "script_score": {

+ 14 - 12
docs/reference/search.asciidoc

@@ -11,26 +11,28 @@ exception of the <<search-explain>> endpoints.
 When executing a search, Elasticsearch will pick the "best" copy of the data
 based on the <<search-adaptive-replica,adaptive replica selection>> formula.
 Which shards will be searched on can also be controlled by providing the
-`routing` parameter. For example, when indexing tweets, the routing value can be
-the user name:
+`routing` parameter.
+
+For example, the following indexing request routes documents to shard `1`:
 
 [source,console]
 --------------------------------------------------
-POST /twitter/_doc?routing=kimchy
+POST /my-index-000001/_doc?routing=1
 {
-  "user" : "kimchy",
-  "post_date" : "2009-11-15T14:12:12",
-  "message" : "trying out Elasticsearch"
+  "@timestamp": "2099-11-15T13:12:00",
+  "message": "GET /search HTTP/1.1 200 1070000",
+  "user": {
+    "id": "kimchy"
+  }
 }
 --------------------------------------------------
 
-In such a case, if we want to search only on the tweets for a specific
-user, we can specify it as the routing, resulting in the search hitting
-only the relevant shard:
+Later, you can use the `routing` parameter in a search request to search only
+the specified shard. The following search requests hits only shard `1`.
 
 [source,console]
 --------------------------------------------------
-POST /twitter/_search?routing=kimchy
+POST /my-index-000001/_search?routing=1
 {
   "query": {
     "bool": {
@@ -40,7 +42,7 @@ POST /twitter/_search?routing=kimchy
         }
       },
       "filter": {
-        "term": { "user": "kimchy" }
+        "term": { "user.id": "kimchy" }
       }
     }
   }
@@ -102,7 +104,7 @@ POST /_search
   "stats" : ["group1", "group2"]
 }
 --------------------------------------------------
-// TEST[setup:twitter]
+// TEST[setup:my_index]
 
 [discrete]
 [[global-search-timeout]]