[DOCS] Update my-index examples (#60132) (#60248)

Changes the following example index names to `my-index-000001` for consistency:

* `my-index`
* `my_index`
* `myindex`
This commit is contained in:
James Rodewig 2020-07-27 15:58:26 -04:00 committed by GitHub
parent 3bb58eb5c1
commit aba785cb6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
154 changed files with 631 additions and 630 deletions

View File

@ -69,7 +69,7 @@ index:: The name of an index containing a mapping that is compatible with the do
[source,console] [source,console]
---------------------------------------------------------------- ----------------------------------------------------------------
PUT /my-index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -90,7 +90,7 @@ POST /_scripts/painless/_execute
}, },
"context": "filter", "context": "filter",
"context_setup": { "context_setup": {
"index": "my-index", "index": "my-index-000001",
"document": { "document": {
"field": "four" "field": "four"
} }
@ -123,7 +123,7 @@ query:: If `_score` is used in the script then a query can specify that it will
[source,console] [source,console]
---------------------------------------------------------------- ----------------------------------------------------------------
PUT /my-index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -148,7 +148,7 @@ POST /_scripts/painless/_execute
}, },
"context": "score", "context": "score",
"context_setup": { "context_setup": {
"index": "my-index", "index": "my-index-000001",
"document": { "document": {
"rank": 4 "rank": 4
} }

View File

@ -348,7 +348,7 @@ Below is an example of how to set up a field for sorting German names in
[source,console] [source,console]
-------------------------- --------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -368,7 +368,7 @@ PUT my_index
} }
} }
GET /my_index/_search <3> GET /my-index-000001/_search <3>
{ {
"query": { "query": {
"match": { "match": {

View File

@ -45,11 +45,11 @@ PUT _ingest/pipeline/attachment
} }
] ]
} }
PUT my_index/_doc/my_id?pipeline=attachment PUT my-index-00001/_doc/my_id?pipeline=attachment
{ {
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=" "data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
} }
GET my_index/_doc/my_id GET my-index-00001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
Returns this: Returns this:
@ -58,7 +58,7 @@ Returns this:
-------------------------------------------------- --------------------------------------------------
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id", "_id": "my_id",
"_version": 1, "_version": 1,
@ -128,11 +128,11 @@ PUT _ingest/pipeline/attachment
} }
] ]
} }
PUT my_index/_doc/my_id?pipeline=attachment PUT my-index-00001/_doc/my_id?pipeline=attachment
{ {
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=" "data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
} }
GET my_index/_doc/my_id GET my-index-00001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
Returns this: Returns this:
@ -141,7 +141,7 @@ Returns this:
-------------------------------------------------- --------------------------------------------------
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id", "_id": "my_id",
"_version": 1, "_version": 1,
@ -176,12 +176,12 @@ PUT _ingest/pipeline/attachment
} }
] ]
} }
PUT my_index/_doc/my_id_2?pipeline=attachment PUT my-index-00001/_doc/my_id_2?pipeline=attachment
{ {
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=", "data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
"max_size": 5 "max_size": 5
} }
GET my_index/_doc/my_id_2 GET my-index-00001/_doc/my_id_2
-------------------------------------------------- --------------------------------------------------
Returns this: Returns this:
@ -190,7 +190,7 @@ Returns this:
-------------------------------------------------- --------------------------------------------------
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id_2", "_id": "my_id_2",
"_version": 1, "_version": 1,
@ -262,7 +262,7 @@ PUT _ingest/pipeline/attachment
} }
] ]
} }
PUT my_index/_doc/my_id?pipeline=attachment PUT my-index-00001/_doc/my_id?pipeline=attachment
{ {
"attachments" : [ "attachments" : [
{ {
@ -275,7 +275,7 @@ PUT my_index/_doc/my_id?pipeline=attachment
} }
] ]
} }
GET my_index/_doc/my_id GET my-index-00001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
Returns this: Returns this:
@ -283,7 +283,7 @@ Returns this:
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"_index" : "my_index", "_index" : "my-index-00001",
"_type" : "_doc", "_type" : "_doc",
"_id" : "my_id", "_id" : "my_id",
"_version" : 1, "_version" : 1,

View File

@ -24,7 +24,7 @@ the search index:
[source,console] [source,console]
-------------------------- --------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -47,7 +47,7 @@ in the search index:
[source,js] [source,js]
-------------------------- --------------------------
GET my_index/_analyze GET my-index-000001/_analyze
{ {
"field": "my_field", "field": "my_field",
"text":"Investors in [Apple](Apple+Inc.) rejoiced." "text":"Investors in [Apple](Apple+Inc.) rejoiced."
@ -112,18 +112,18 @@ in this example where a search for `Beck` will not match `Jeff Beck` :
[source,console] [source,console]
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"my_field": "[Beck](Beck) announced a new tour"<1> "my_field": "[Beck](Beck) announced a new tour"<1>
} }
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"my_field": "[Jeff Beck](Jeff+Beck&Guitarist) plays a strat"<2> "my_field": "[Jeff Beck](Jeff+Beck&Guitarist) plays a strat"<2>
} }
# Example search # Example search
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"term": { "term": {
@ -164,7 +164,7 @@ sense to include them in dedicated structured fields to support discovery via ag
[source,console] [source,console]
-------------------------- --------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -189,13 +189,13 @@ Applications would then typically provide content and discover it as follows:
[source,console] [source,console]
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"my_unstructured_text_field": "[Shay](%40kimchy) created elasticsearch", "my_unstructured_text_field": "[Shay](%40kimchy) created elasticsearch",
"my_twitter_handles": ["@kimchy"] <1> "my_twitter_handles": ["@kimchy"] <1>
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"query_string": { "query_string": {
@ -264,12 +264,12 @@ in a way which is respectful of the original markup:
[source,console] [source,console]
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"my_field": "The cat sat on the [mat](sku3578)" "my_field": "The cat sat on the [mat](sku3578)"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"query_string": { "query_string": {

View File

@ -16,7 +16,7 @@ value and its hash are stored in the index:
[source,console] [source,console]
-------------------------- --------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -40,17 +40,17 @@ of the values of the `my_field` field. This is only useful in order to run
[source,console] [source,console]
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"my_field": "This is a document" "my_field": "This is a document"
} }
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"my_field": "This is another document" "my_field": "This is another document"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"aggs": { "aggs": {
"my_field_cardinality": { "my_field_cardinality": {

View File

@ -15,7 +15,7 @@ In order to enable the `_size` field, set the mapping as follows:
[source,console] [source,console]
-------------------------- --------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"_size": { "_size": {
@ -31,17 +31,17 @@ and when sorting:
[source,console] [source,console]
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"text": "This is a document" "text": "This is a document"
} }
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"text": "This is another document" "text": "This is another document"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"range": { "range": {

View File

@ -46,7 +46,7 @@ It can also be set on a per-index basis at index creation time:
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.store.type": "smb_mmap_fs" "index.store.type": "smb_mmap_fs"

View File

@ -78,11 +78,11 @@ Simple use-case:
>>> es = Elasticsearch() >>> es = Elasticsearch()
# datetimes will be serialized # datetimes will be serialized
>>> es.index(index="my-index", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()}) >>> es.index(index="my-index-000001", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()})
{u'_id': u'42', u'_index': u'my-index', u'_type': u'test-type', u'_version': 1, u'ok': True} {u'_id': u'42', u'_index': u'my-index-000001', u'_type': u'test-type', u'_version': 1, u'ok': True}
# but not deserialized # but not deserialized
>>> es.get(index="my-index", doc_type="test-type", id=42)['_source'] >>> es.get(index="my-index-000001", doc_type="test-type", id=42)['_source']
{u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'} {u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'}
------------------------------------ ------------------------------------

View File

@ -119,22 +119,22 @@ Consider the following example:
[source,console] [source,console]
--------------------------------- ---------------------------------
PUT my_index/log/1?refresh PUT my-index-00001/log/1?refresh
{ {
"date": "2015-10-01T00:30:00Z" "date": "2015-10-01T00:30:00Z"
} }
PUT my_index/log/2?refresh PUT my-index-00001/log/2?refresh
{ {
"date": "2015-10-01T01:30:00Z" "date": "2015-10-01T01:30:00Z"
} }
PUT my_index/log/3?refresh PUT my-index-00001/log/3?refresh
{ {
"date": "2015-10-01T02:30:00Z" "date": "2015-10-01T02:30:00Z"
} }
GET my_index/_search?size=0 GET my-index-00001/_search?size=0
{ {
"aggs": { "aggs": {
"by_day": { "by_day": {
@ -185,7 +185,7 @@ midnight UTC:
[source,console] [source,console]
--------------------------------- ---------------------------------
GET my_index/_search?size=0 GET my-index-00001/_search?size=0
{ {
"aggs": { "aggs": {
"by_day": { "by_day": {

View File

@ -293,17 +293,17 @@ include::datehistogram-aggregation.asciidoc[tag=offset-explanation]
[source,console,id=composite-aggregation-datehistogram-offset-example] [source,console,id=composite-aggregation-datehistogram-offset-example]
---- ----
PUT my_index/_doc/1?refresh PUT my-index-000001/_doc/1?refresh
{ {
"date": "2015-10-01T05:30:00Z" "date": "2015-10-01T05:30:00Z"
} }
PUT my_index/_doc/2?refresh PUT my-index-000001/_doc/2?refresh
{ {
"date": "2015-10-01T06:30:00Z" "date": "2015-10-01T06:30:00Z"
} }
GET my_index/_search?size=0 GET my-index-000001/_search?size=0
{ {
"aggs": { "aggs": {
"my_buckets": { "my_buckets": {

View File

@ -378,17 +378,17 @@ Consider the following example:
[source,console] [source,console]
--------------------------------- ---------------------------------
PUT my_index/_doc/1?refresh PUT my-index-000001/_doc/1?refresh
{ {
"date": "2015-10-01T00:30:00Z" "date": "2015-10-01T00:30:00Z"
} }
PUT my_index/_doc/2?refresh PUT my-index-000001/_doc/2?refresh
{ {
"date": "2015-10-01T01:30:00Z" "date": "2015-10-01T01:30:00Z"
} }
GET my_index/_search?size=0 GET my-index-000001/_search?size=0
{ {
"aggs": { "aggs": {
"by_day": { "by_day": {
@ -429,7 +429,7 @@ before midnight UTC:
[source,console] [source,console]
--------------------------------- ---------------------------------
GET my_index/_search?size=0 GET my-index-000001/_search?size=0
{ {
"aggs": { "aggs": {
"by_day": { "by_day": {
@ -500,17 +500,17 @@ to run from 6am to 6am:
[source,console] [source,console]
----------------------------- -----------------------------
PUT my_index/_doc/1?refresh PUT my-index-000001/_doc/1?refresh
{ {
"date": "2015-10-01T05:30:00Z" "date": "2015-10-01T05:30:00Z"
} }
PUT my_index/_doc/2?refresh PUT my-index-000001/_doc/2?refresh
{ {
"date": "2015-10-01T06:30:00Z" "date": "2015-10-01T06:30:00Z"
} }
GET my_index/_search?size=0 GET my-index-000001/_search?size=0
{ {
"aggs": { "aggs": {
"by_day": { "by_day": {

View File

@ -8,7 +8,7 @@ to support a list of stop words:
[source,console] [source,console]
-------------------------------- --------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -36,13 +36,13 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"field": "my_text", <2> "field": "my_text", <2>
"text": "The old brown cow" "text": "The old brown cow"
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"field": "my_text.english", <3> "field": "my_text.english", <3>
"text": "The old brown cow" "text": "The old brown cow"

View File

@ -53,7 +53,7 @@ Token Filters::
[source,console] [source,console]
-------------------------------- --------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -74,7 +74,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_custom_analyzer", "analyzer": "my_custom_analyzer",
"text": "Is this <b>déjà vu</b>?" "text": "Is this <b>déjà vu</b>?"
@ -155,7 +155,7 @@ Here is an example:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -197,7 +197,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_custom_analyzer", "analyzer": "my_custom_analyzer",
"text": "I'm a :) person, and you?" "text": "I'm a :) person, and you?"

View File

@ -87,7 +87,7 @@ pre-defined list of English stop words:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -101,7 +101,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_fingerprint_analyzer", "analyzer": "my_fingerprint_analyzer",
"text": "Yes yes, Gödel said this sentence is consistent and." "text": "Yes yes, Gödel said this sentence is consistent and."

View File

@ -178,7 +178,7 @@ on non-word characters or on underscores (`\W|_`), and to lower-case the result:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -193,7 +193,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_email_analyzer", "analyzer": "my_email_analyzer",
"text": "John_Smith@foo-bar.com" "text": "John_Smith@foo-bar.com"
@ -265,7 +265,7 @@ The following more complicated example splits CamelCase text into tokens:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -279,7 +279,7 @@ PUT my_index
} }
} }
GET my_index/_analyze GET my-index-000001/_analyze
{ {
"analyzer": "camel", "analyzer": "camel",
"text": "MooseX::FTPClass2_beta" "text": "MooseX::FTPClass2_beta"

View File

@ -132,7 +132,7 @@ adding token filters.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -152,7 +152,7 @@ pre-defined list of English stop words:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -167,7 +167,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_english_analyzer", "analyzer": "my_english_analyzer",
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."

View File

@ -131,7 +131,7 @@ words as stop words:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -145,7 +145,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_stop_analyzer", "analyzer": "my_stop_analyzer",
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."

View File

@ -62,7 +62,7 @@ The following <<indices-create-index,create index API>> request uses the
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -104,7 +104,7 @@ HTML element.
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -107,7 +107,7 @@ with a text equivalent.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -139,7 +139,7 @@ the text `I'm delighted about it :(`.
[source,console] [source,console]
---- ----
GET /my_index/_analyze GET /my-index-000001/_analyze
{ {
"tokenizer": "keyword", "tokenizer": "keyword",
"char_filter": [ "my_mappings_char_filter" ], "char_filter": [ "my_mappings_char_filter" ],

View File

@ -52,7 +52,7 @@ replace any embedded dashes in numbers with underscores, i.e `123-456-789` ->
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-00001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -75,7 +75,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-00001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "My credit card is 123-456-789" "text": "My credit card is 123-456-789"
@ -102,7 +102,7 @@ camelCase words to be queried individually:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-00001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -136,7 +136,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-00001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "The fooBarBaz method" "text": "The fooBarBaz method"
@ -203,12 +203,12 @@ the length of the original text:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index/_doc/1?refresh PUT my-index-00001/_doc/1?refresh
{ {
"text": "The fooBarBaz method" "text": "The fooBarBaz method"
} }
GET my_index/_search GET my-index-00001/_search
{ {
"query": { "query": {
"match": { "match": {
@ -245,7 +245,7 @@ The output from the above is:
"max_score": 0.2876821, "max_score": 0.2876821,
"hits": [ "hits": [
{ {
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "1", "_id": "1",
"_score": 0.2876821, "_score": 0.2876821,

View File

@ -48,7 +48,7 @@ The following <<indices-create-index,create index API>> request sets the
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -68,11 +68,11 @@ In addition to a field-level analyzer, you can set a fallback analyzer for
using the `analysis.analyzer.default` setting. using the `analysis.analyzer.default` setting.
The following <<indices-create-index,create index API>> request sets the The following <<indices-create-index,create index API>> request sets the
`simple` analyzer as the fallback analyzer for `my_index`. `simple` analyzer as the fallback analyzer for `my-index-000001`.
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -128,7 +128,7 @@ the search analyzer for a <<query-dsl-match-query,`match`>> query.
[source,console] [source,console]
---- ----
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"match": { "match": {
@ -140,7 +140,7 @@ GET my_index/_search
} }
} }
---- ----
// TEST[s/^/PUT my_index\n/] // TEST[s/^/PUT my-index-000001\n/]
[[specify-search-field-analyzer]] [[specify-search-field-analyzer]]
==== Specify the search analyzer for a field ==== Specify the search analyzer for a field
@ -156,7 +156,7 @@ The following <<indices-create-index,create index API>> request sets the
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -180,11 +180,11 @@ If a search analyzer is provided, a default index analyzer must also be
specified using the `analysis.analyzer.default` setting. specified using the `analysis.analyzer.default` setting.
The following <<indices-create-index,create index API>> request sets the The following <<indices-create-index,create index API>> request sets the
`whitespace` analyzer as the default search analyzer for the `my_index` index. `whitespace` analyzer as the default search analyzer for the `my-index-000001` index.
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -123,7 +123,7 @@ referred to when running the `analyze` API on a specific index:
[source,console] [source,console]
------------------------------------- -------------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -149,13 +149,13 @@ PUT my_index
} }
} }
GET my_index/_analyze <3> GET my-index-000001/_analyze <3>
{ {
"analyzer": "std_folded", <4> "analyzer": "std_folded", <4>
"text": "Is this déjà vu?" "text": "Is this déjà vu?"
} }
GET my_index/_analyze <3> GET my-index-000001/_analyze <3>
{ {
"field": "my_text", <5> "field": "my_text", <5>
"text": "Is this déjà vu?" "text": "Is this déjà vu?"

View File

@ -201,7 +201,7 @@ these token graphs, making them suitable for indexing.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -201,7 +201,7 @@ output.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -363,7 +363,7 @@ not stem these tokens.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -382,7 +382,7 @@ create a stemmed and unstemmed version of each token in a stream. The
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -96,7 +96,7 @@ before the `kstem` filter in the analyzer configuration.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -132,7 +132,7 @@ The request also assigns the custom analyzer to the `fingerprint` field mapping.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -134,7 +134,7 @@ removed.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -95,7 +95,7 @@ filter before the `porter_stem` filter in the analyzer configuration.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -100,7 +100,7 @@ The `my_script_filter` filter removes tokens with of any type other than
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -134,7 +134,7 @@ filter then removes any duplicate tokens in the same position.
[source,console] [source,console]
---- ----
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -296,7 +296,7 @@ analyzer>>.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -486,7 +486,7 @@ only shingles are included in the output.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -15,7 +15,7 @@ For example:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -23,7 +23,7 @@ Here is an example:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -55,7 +55,7 @@ You can also define the overrides rules inline:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -83,7 +83,7 @@ analyzer>>.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -256,7 +256,7 @@ words using the `light_german` algorithm:
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -104,7 +104,7 @@ filter to configure a new <<analysis-custom-analyzer,custom analyzer>>.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -181,7 +181,7 @@ words list:
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -208,7 +208,7 @@ words `and`, `is`, and `the`:
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -135,7 +135,7 @@ The following <<indices-create-index,create index API>> request uses the
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -408,7 +408,7 @@ filter that uses the following rules:
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -146,7 +146,7 @@ The following <<indices-create-index,create index API>> request uses the
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -357,7 +357,7 @@ filter that uses the following rules:
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {

View File

@ -146,7 +146,7 @@ In this example, we configure the `classic` tokenizer to have a
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -165,7 +165,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."

View File

@ -142,7 +142,7 @@ length `10`:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-00001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -166,7 +166,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-00001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "2 Quick Foxes." "text": "2 Quick Foxes."
@ -262,7 +262,7 @@ search terms longer than 10 characters may not match any indexed terms.
[source,console] [source,console]
----------------------------------- -----------------------------------
PUT my_index PUT my-index-00001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -300,14 +300,14 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-00001/_doc/1
{ {
"title": "Quick Foxes" <1> "title": "Quick Foxes" <1>
} }
POST my_index/_refresh POST my-index-00001/_refresh
GET my_index/_search GET my-index-00001/_search
{ {
"query": { "query": {
"match": { "match": {
@ -344,7 +344,7 @@ GET my_index/_search
"max_score": 0.5753642, "max_score": 0.5753642,
"hits": [ "hits": [
{ {
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "1", "_id": "1",
"_score": 0.5753642, "_score": 0.5753642,

View File

@ -218,7 +218,7 @@ digits as tokens, and to produce tri-grams (grams of length `3`):
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -242,7 +242,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "2 Quick Foxes." "text": "2 Quick Foxes."

View File

@ -94,7 +94,7 @@ characters, and to replace them with `/`. The first two tokens are skipped:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -115,7 +115,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "one-two-three-four-five" "text": "one-two-three-four-five"

View File

@ -126,7 +126,7 @@ tokens when it encounters commas:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -145,7 +145,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "comma,separated,values" "text": "comma,separated,values"
@ -214,7 +214,7 @@ escaped, so the pattern ends up looking like:
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -234,7 +234,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "\"value\", \"value with embedded \\\" quote\"" "text": "\"value\", \"value with embedded \\\" quote\""

View File

@ -37,7 +37,7 @@ three-digit numbers
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -56,7 +56,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "fd-786-335-514-x" "text": "fd-786-335-514-x"

View File

@ -38,7 +38,7 @@ text on underscores.
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -57,7 +57,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "an_underscored_phrase" "text": "an_underscored_phrase"

View File

@ -137,7 +137,7 @@ In this example, we configure the `standard` tokenizer to have a
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -156,7 +156,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."

View File

@ -93,7 +93,7 @@ In this example, we configure the `uax_url_email` tokenizer to have a
[source,console] [source,console]
---------------------------- ----------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"analysis": { "analysis": {
@ -112,7 +112,7 @@ PUT my_index
} }
} }
POST my_index/_analyze POST my-index-000001/_analyze
{ {
"analyzer": "my_analyzer", "analyzer": "my_analyzer",
"text": "john.smith@global-international.com" "text": "john.smith@global-international.com"

View File

@ -68,7 +68,7 @@ it finds by sending an empty body for the request.
////// //////
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /myindex PUT /my-index-000001
-------------------------------------------------- --------------------------------------------------
// TESTSETUP // TESTSETUP
////// //////
@ -77,7 +77,7 @@ PUT /myindex
-------------------------------------------------- --------------------------------------------------
GET /_cluster/allocation/explain GET /_cluster/allocation/explain
{ {
"index": "myindex", "index": "my-index-000001",
"shard": 0, "shard": 0,
"primary": true "primary": true
} }
@ -90,7 +90,7 @@ GET /_cluster/allocation/explain
-------------------------------------------------- --------------------------------------------------
GET /_cluster/allocation/explain GET /_cluster/allocation/explain
{ {
"index": "myindex", "index": "my-index-000001",
"shard": 0, "shard": 0,
"primary": false, "primary": false,
"current_node": "nodeA" <1> "current_node": "nodeA" <1>
@ -106,22 +106,23 @@ GET /_cluster/allocation/explain
////// //////
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
DELETE myindex DELETE my-index-000001
-------------------------------------------------- --------------------------------------------------
////// //////
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /my_index?master_timeout=1s&timeout=1s PUT /my-index-000001?master_timeout=1s&timeout=1s
{"settings": {"index.routing.allocation.include._name": "non_existent_node"} } {"settings": {"index.routing.allocation.include._name": "non_existent_node"} }
GET /_cluster/allocation/explain GET /_cluster/allocation/explain
{ {
"index": "my_index", "index": "my-index-000001",
"shard": 0, "shard": 0,
"primary": true "primary": true
} }
-------------------------------------------------- --------------------------------------------------
// TEST[continued]
The API returns the following response for an unassigned primary shard: The API returns the following response for an unassigned primary shard:
@ -129,7 +130,7 @@ The API returns the following response for an unassigned primary shard:
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"index" : "my_index", "index" : "my-index-000001",
"shard" : 0, "shard" : 0,
"primary" : true, "primary" : true,
"current_state" : "unassigned", <1> "current_state" : "unassigned", <1>
@ -178,7 +179,7 @@ allocated to a node in the cluster:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
{ {
"index" : "my_index", "index" : "my-index-000001",
"shard" : 0, "shard" : 0,
"primary" : true, "primary" : true,
"current_state" : "unassigned", "current_state" : "unassigned",
@ -203,7 +204,7 @@ allocation:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
{ {
"index" : "my_index", "index" : "my-index-000001",
"shard" : 0, "shard" : 0,
"primary" : false, "primary" : false,
"current_state" : "unassigned", "current_state" : "unassigned",
@ -239,7 +240,7 @@ allocation:
{ {
"decider" : "same_shard", "decider" : "same_shard",
"decision" : "NO", "decision" : "NO",
"explanation" : "a copy of this shard is already allocated to this node [[my_index][0], node[3sULLVJrRneSg0EfBB-2Ew], [P], s[STARTED], a[id=eV9P8BN1QPqRc3B4PLx6cg]]" "explanation" : "a copy of this shard is already allocated to this node [[my-index-000001][0], node[3sULLVJrRneSg0EfBB-2Ew], [P], s[STARTED], a[id=eV9P8BN1QPqRc3B4PLx6cg]]"
} }
] ]
} }
@ -260,7 +261,7 @@ its current node and is required to move:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
{ {
"index" : "my_index", "index" : "my-index-000001",
"shard" : 0, "shard" : 0,
"primary" : true, "primary" : true,
"current_state" : "started", "current_state" : "started",
@ -309,7 +310,7 @@ because moving the shard to another node does not form a better cluster balance:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
{ {
"index" : "my_index", "index" : "my-index-000001",
"shard" : 0, "shard" : 0,
"primary" : true, "primary" : true,
"current_state" : "started", "current_state" : "started",

View File

@ -17,7 +17,7 @@ event.
//// ////
[source,console] [source,console]
---- ----
PUT /my_index/_bulk?refresh PUT /my-index-00001/_bulk?refresh
{"index":{ }} {"index":{ }}
{ "@timestamp": "2020-12-06T11:04:05.000Z", "agent": { "id": "8a4f500d" }, "event": { "category": "process", "id": "edwCRnyD", "sequence": 1 }, "process": { "name": "cmd.exe", "executable": "C:\\Windows\\System32\\cmd.exe" } } { "@timestamp": "2020-12-06T11:04:05.000Z", "agent": { "id": "8a4f500d" }, "event": { "category": "process", "id": "edwCRnyD", "sequence": 1 }, "process": { "name": "cmd.exe", "executable": "C:\\Windows\\System32\\cmd.exe" } }
{"index":{ }} {"index":{ }}
@ -36,7 +36,7 @@ PUT /my_index/_bulk?refresh
[source,console] [source,console]
---- ----
GET /my_index/_eql/search GET /my-index-00001/_eql/search
{ {
"query": """ "query": """
process where process.name = "regsvr32.exe" process where process.name = "regsvr32.exe"
@ -510,7 +510,7 @@ The following EQL search request searches for events with an `event.category` of
[source,console] [source,console]
---- ----
GET /my_index/_eql/search GET /my-index-00001/_eql/search
{ {
"query": """ "query": """
file where (file.name == "cmd.exe" and agent.id != "my_user") file where (file.name == "cmd.exe" and agent.id != "my_user")
@ -542,7 +542,7 @@ the events in ascending, lexicographic order.
}, },
"events": [ "events": [
{ {
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "fwGeywNsBl8Y9Ys1x51b", "_id": "fwGeywNsBl8Y9Ys1x51b",
"_score": null, "_score": null,
@ -570,7 +570,7 @@ the events in ascending, lexicographic order.
} }
}, },
{ {
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "AtOJ4UjUBAAx3XR5kcCM", "_id": "AtOJ4UjUBAAx3XR5kcCM",
"_score": null, "_score": null,
@ -629,7 +629,7 @@ These events must also share the same `agent.id` value.
[source,console] [source,console]
---- ----
GET /my_index/_eql/search GET /my-index-00001/_eql/search
{ {
"query": """ "query": """
sequence by agent.id sequence by agent.id
@ -668,7 +668,7 @@ the events in ascending, lexicographic order.
], ],
"events": [ "events": [
{ {
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "AtOJ4UjUBAAx3XR5kcCM", "_id": "AtOJ4UjUBAAx3XR5kcCM",
"_version": 1, "_version": 1,
@ -699,7 +699,7 @@ the events in ascending, lexicographic order.
} }
}, },
{ {
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "yDwnGIJouOYGBzP0ZE9n", "_id": "yDwnGIJouOYGBzP0ZE9n",
"_version": 1, "_version": 1,

View File

@ -19,16 +19,16 @@ When targeting a data stream, the new index becomes the data stream's
To roll over an <<indices-aliases, index alias>>, the alias and its write index To roll over an <<indices-aliases, index alias>>, the alias and its write index
must meet the following conditions: must meet the following conditions:
* The index name must match the pattern '^.*-\\d+$', for example (`my_index-000001`). * The index name must match the pattern '^.*-\\d+$', for example (`my-index-000001`).
* The `index.lifecycle.rollover_alias` must be configured as the alias to roll over. * The `index.lifecycle.rollover_alias` must be configured as the alias to roll over.
* The index must be the <<indices-rollover-is-write-index, write index>> for the alias. * The index must be the <<indices-rollover-is-write-index, write index>> for the alias.
For example, if `my_index-000001` has the alias `my_data`, For example, if `my-index-000001` has the alias `my_data`,
the following settings must be configured. the following settings must be configured.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index-000001 PUT my-index-000001
{ {
"settings": { "settings": {
"index.lifecycle.name": "my_policy", "index.lifecycle.name": "my_policy",

View File

@ -57,7 +57,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
[[ilm-explain-lifecycle-example]] [[ilm-explain-lifecycle-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example retrieves the lifecycle state of `my_index`: The following example retrieves the lifecycle state of `my-index-000001`:
////////////////////////// //////////////////////////
@ -85,7 +85,7 @@ PUT _ilm/policy/my_policy
} }
} }
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.lifecycle.name": "my_policy", "index.lifecycle.name": "my_policy",
@ -101,7 +101,7 @@ GET /_cluster/health?wait_for_status=green&timeout=10s
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
GET my_index/_ilm/explain GET my-index-000001/_ilm/explain
-------------------------------------------------- --------------------------------------------------
// TEST[continued] // TEST[continued]
@ -112,8 +112,8 @@ that the index is managed and in the `new` phase:
-------------------------------------------------- --------------------------------------------------
{ {
"indices": { "indices": {
"my_index": { "my-index-000001": {
"index": "my_index", "index": "my-index-000001",
"managed": true, <1> "managed": true, <1>
"policy": "my_policy", <2> "policy": "my_policy", <2>
"lifecycle_date_millis": 1538475653281, <3> "lifecycle_date_millis": 1538475653281, <3>

View File

@ -102,7 +102,7 @@ The name of the step to move to and execute.
[[ilm-move-to-step-example]] [[ilm-move-to-step-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example moves `my_index` from the initial step to the The following example moves `my-index-000001` from the initial step to the
`forcemerge` step: `forcemerge` step:
////////////////////////// //////////////////////////
@ -131,7 +131,7 @@ PUT _ilm/policy/my_policy
} }
} }
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.lifecycle.name": "my_policy" "index.lifecycle.name": "my_policy"
@ -143,7 +143,7 @@ PUT my_index
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST _ilm/move/my_index POST _ilm/move/my-index-000001
{ {
"current_step": { <1> "current_step": { <1>
"phase": "new", "phase": "new",

View File

@ -48,7 +48,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
[[ilm-remove-policy-example]] [[ilm-remove-policy-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example removes the assigned policy from `my_index`. The following example removes the assigned policy from `my-index-000001`.
////////////////////////// //////////////////////////
@ -76,7 +76,7 @@ PUT _ilm/policy/my_policy
} }
} }
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.lifecycle.name": "my_policy" "index.lifecycle.name": "my_policy"
@ -88,7 +88,7 @@ PUT my_index
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST my_index/_ilm/remove POST my-index-000001/_ilm/remove
-------------------------------------------------- --------------------------------------------------
// TEST[continued] // TEST[continued]

View File

@ -41,11 +41,11 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
[[ilm-retry-policy-example]] [[ilm-retry-policy-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example retries the policy for `my_index`. The following example retries the policy for `my-index-000001`.
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
POST my_index/_ilm/retry POST my-index-000001/_ilm/retry
-------------------------------------------------- --------------------------------------------------
// NOTCONSOLE // NOTCONSOLE

View File

@ -65,7 +65,7 @@ PUT _ilm/policy/my_policy
} }
} }
PUT my_index PUT my-index-000001
POST _ilm/stop POST _ilm/stop
-------------------------------------------------- --------------------------------------------------

View File

@ -70,7 +70,7 @@ PUT _ilm/policy/my_policy
} }
} }
PUT my_index PUT my-index-000001
-------------------------------------------------- --------------------------------------------------
// TEST // TEST

View File

@ -37,7 +37,7 @@ index that has only two shards:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /myindex PUT /my-index-000001
{ {
"settings": { "settings": {
"index.number_of_shards": 2, "index.number_of_shards": 2,
@ -47,16 +47,16 @@ PUT /myindex
-------------------------------------------------- --------------------------------------------------
// TEST[continued] // TEST[continued]
After five days, {ilm-init} attempts to shrink `myindex` from two shards to four shards. After five days, {ilm-init} attempts to shrink `my-index-000001` from two shards to four shards.
Because the shrink action cannot _increase_ the number of shards, this operation fails Because the shrink action cannot _increase_ the number of shards, this operation fails
and {ilm-init} moves `myindex` to the `ERROR` step. and {ilm-init} moves `my-index-000001` to the `ERROR` step.
You can use the <<ilm-explain-lifecycle,{ilm-init} Explain API>> to get information about You can use the <<ilm-explain-lifecycle,{ilm-init} Explain API>> to get information about
what went wrong: what went wrong:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
GET /myindex/_ilm/explain GET /my-index-000001/_ilm/explain
-------------------------------------------------- --------------------------------------------------
// TEST[continued] // TEST[continued]
@ -66,8 +66,8 @@ Which returns the following information:
-------------------------------------------------- --------------------------------------------------
{ {
"indices" : { "indices" : {
"myindex" : { "my-index-000001" : {
"index" : "myindex", "index" : "my-index-000001",
"managed" : true, "managed" : true,
"policy" : "shrink-index", <1> "policy" : "shrink-index", <1>
"lifecycle_date_millis" : 1541717265865, "lifecycle_date_millis" : 1541717265865,
@ -141,7 +141,7 @@ you might need to explicitly tell {ilm-init} to retry the step:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /myindex/_ilm/retry POST /my-index-000001/_ilm/retry
-------------------------------------------------- --------------------------------------------------
// TEST[skip:we can't be sure the index is ready to be retried at this point] // TEST[skip:we can't be sure the index is ready to be retried at this point]

View File

@ -46,7 +46,7 @@ PUT _ilm/policy/my_policy
} }
} }
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.lifecycle.name": "my_policy" "index.lifecycle.name": "my_policy"

View File

@ -141,9 +141,9 @@ The following example shows how to add an index block:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /my_index/_block/write PUT /my-index-000001/_block/write
-------------------------------------------------- --------------------------------------------------
// TEST[s/^/PUT my_index\n/] // TEST[s/^/PUT my-index-000001\n/]
The API returns following response: The API returns following response:
@ -153,7 +153,7 @@ The API returns following response:
"acknowledged" : true, "acknowledged" : true,
"shards_acknowledged" : true, "shards_acknowledged" : true,
"indices" : [ { "indices" : [ {
"name" : "my_index", "name" : "my-index-000001",
"blocked" : true "blocked" : true
} ] } ]
} }

View File

@ -28,7 +28,7 @@ creation time:
[source,console] [source,console]
--------------------------------- ---------------------------------
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"index.store.type": "hybridfs" "index.store.type": "hybridfs"
@ -118,7 +118,7 @@ or in the index settings at index creation time:
[source,console] [source,console]
--------------------------------- ---------------------------------
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"index.store.preload": ["nvd", "dvd"] "index.store.preload": ["nvd", "dvd"]

View File

@ -47,8 +47,8 @@ The following example freezes and unfreezes an index:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /my_index/_freeze POST /my-index-000001/_freeze
POST /my_index/_unfreeze POST /my-index-000001/_unfreeze
-------------------------------------------------- --------------------------------------------------
// TEST[s/^/PUT my_index\n/] // TEST[s/^/PUT my-index-000001\n/]

View File

@ -100,7 +100,7 @@ NOTE: Using the following analyzer as an index analyzer results in an error.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /my_index PUT /my-index-000001
{ {
"settings": { "settings": {
"index": { "index": {
@ -144,7 +144,7 @@ and pick up the file changes.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /my_index/_reload_search_analyzers POST /my-index-000001/_reload_search_analyzers
-------------------------------------------------- --------------------------------------------------
// TEST[continued] // TEST[continued]
@ -160,7 +160,7 @@ The API returns the following response.
}, },
"reload_details": [ "reload_details": [
{ {
"index": "my_index", "index": "my-index-000001",
"reloaded_analyzers": [ "reloaded_analyzers": [
"my_synonyms" "my_synonyms"
], ],

View File

@ -40,7 +40,7 @@ The following example freezes and unfreezes an index:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /my_index/_freeze POST /my-index-000001/_freeze
POST /my_index/_unfreeze POST /my-index-000001/_unfreeze
-------------------------------------------------- --------------------------------------------------
// TEST[s/^/PUT my_index\n/] // TEST[s/^/PUT my-index-000001\n/]

View File

@ -64,9 +64,9 @@ The following example shows how to close an index:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /my_index/_close POST /my-index-000001/_close
-------------------------------------------------- --------------------------------------------------
// TEST[s/^/PUT my_index\n/] // TEST[s/^/PUT my-index-000001\n/]
The API returns following response: The API returns following response:
@ -76,7 +76,7 @@ The API returns following response:
"acknowledged": true, "acknowledged": true,
"shards_acknowledged": true, "shards_acknowledged": true,
"indices": { "indices": {
"my_index": { "my-index-000001": {
"closed": true "closed": true
} }
} }

View File

@ -116,13 +116,13 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
[[open-index-api-example]] [[open-index-api-example]]
==== {api-examples-title} ==== {api-examples-title}
The following request re-opens a closed index named `my_index`. The following request re-opens a closed index named `my-index-000001`.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /my_index/_open POST /my-index-000001/_open
-------------------------------------------------- --------------------------------------------------
// TEST[s/^/PUT my_index\nPOST my_index\/_close\n/] // TEST[s/^/PUT my-index-000001\nPOST my-index-000001\/_close\n/]
The API returns the following response: The API returns the following response:

View File

@ -227,7 +227,7 @@ replace the template without specifying one.
-------------------------------------------------- --------------------------------------------------
PUT /_template/template_1 PUT /_template/template_1
{ {
"index_patterns" : ["myindex-*"], "index_patterns" : ["my-index-*"],
"order" : 0, "order" : 0,
"settings" : { "settings" : {
"number_of_shards" : 1 "number_of_shards" : 1

View File

@ -155,7 +155,7 @@ and an inner `first` text field.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -177,7 +177,7 @@ to the `name` field.
[source,console] [source,console]
---- ----
PUT /my_index/_mapping PUT /my-index-000001/_mapping
{ {
"properties": { "properties": {
"name": { "name": {
@ -197,7 +197,7 @@ to verify your changes.
[source,console] [source,console]
---- ----
GET /my_index/_mapping GET /my-index-000001/_mapping
---- ----
// TEST[continued] // TEST[continued]
@ -206,7 +206,7 @@ The API returns the following response:
[source,console-result] [source,console-result]
---- ----
{ {
"my_index" : { "my-index-000001" : {
"mappings" : { "mappings" : {
"properties" : { "properties" : {
"name" : { "name" : {
@ -245,7 +245,7 @@ with the `city` <<text,text>> field.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -268,7 +268,7 @@ which can be used for sorting.
[source,console] [source,console]
---- ----
PUT /my_index/_mapping PUT /my-index-000001/_mapping
{ {
"properties": { "properties": {
"city": { "city": {
@ -289,7 +289,7 @@ to verify your changes.
[source,console] [source,console]
---- ----
GET /my_index/_mapping GET /my-index-000001/_mapping
---- ----
// TEST[continued] // TEST[continued]
@ -298,7 +298,7 @@ The API returns the following response:
[source,console-result] [source,console-result]
---- ----
{ {
"my_index" : { "my-index-000001" : {
"mappings" : { "mappings" : {
"properties" : { "properties" : {
"city" : { "city" : {
@ -338,7 +338,7 @@ of `20`.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -357,7 +357,7 @@ to `100`.
[source,console] [source,console]
---- ----
PUT /my_index/_mapping PUT /my-index-000001/_mapping
{ {
"properties": { "properties": {
"user_id": { "user_id": {
@ -374,7 +374,7 @@ to verify your changes.
[source,console] [source,console]
---- ----
GET /my_index/_mapping GET /my-index-000001/_mapping
---- ----
// TEST[continued] // TEST[continued]
@ -383,7 +383,7 @@ The API returns the following response:
[source,console-result] [source,console-result]
---- ----
{ {
"my_index" : { "my-index-000001" : {
"mappings" : { "mappings" : {
"properties" : { "properties" : {
"user_id" : { "user_id" : {
@ -533,7 +533,7 @@ with the `user_identifier` field.
[source,console] [source,console]
---- ----
PUT /my_index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -550,7 +550,7 @@ for the existing `user_identifier` field.
[source,console] [source,console]
---- ----
PUT /my_index/_mapping PUT /my-index-000001/_mapping
{ {
"properties": { "properties": {
"user_id": { "user_id": {
@ -567,7 +567,7 @@ to verify your changes.
[source,console] [source,console]
---- ----
GET /my_index/_mapping GET /my-index-000001/_mapping
---- ----
// TEST[continued] // TEST[continued]
@ -576,7 +576,7 @@ The API returns the following response:
[source,console-result] [source,console-result]
---- ----
{ {
"my_index" : { "my-index-000001" : {
"mappings" : { "mappings" : {
"properties" : { "properties" : {
"user_id" : { "user_id" : {

View File

@ -21,11 +21,11 @@ PUT /freeze-index
POST /freeze-index/_freeze POST /freeze-index/_freeze
PUT /my-index PUT /my-index-000001
PUT /freeze-index/_alias/f-alias PUT /freeze-index/_alias/f-alias
PUT /my-index/_alias/f-alias PUT /my-index-000001/_alias/f-alias
PUT /_index_template/foo_data_stream PUT /_index_template/foo_data_stream
{ {
@ -120,7 +120,7 @@ The API returns the following response:
"name": "f-alias", "name": "f-alias",
"indices": [ "indices": [
"freeze-index", "freeze-index",
"my-index" "my-index-000001"
] ]
} }
], ],

View File

@ -139,7 +139,7 @@ for assigned primary and replica shards.
GET /_shard_stores?status=green GET /_shard_stores?status=green
-------------------------------------------------- --------------------------------------------------
// TEST[setup:node] // TEST[setup:node]
// TEST[s/^/PUT my-index\n{"settings":{"number_of_shards":1, "number_of_replicas": 0}}\nPOST my-index\/test\?refresh\n{"test": "test"}\n/] // TEST[s/^/PUT my-index-00001\n{"settings":{"number_of_shards":1, "number_of_replicas": 0}}\nPOST my-index-00001\/test\?refresh\n{"test": "test"}\n/]
The API returns the following response: The API returns the following response:
@ -147,19 +147,19 @@ The API returns the following response:
-------------------------------------------------- --------------------------------------------------
{ {
"indices": { "indices": {
"my-index": { "my-index-00001": {
"shards": { "shards": {
"0": { <1> "0": { <1>
"stores": [ <2> "stores": [ <2>
{ {
"sPa3OgxLSYGvQ4oPs-Tajw": { <3> "sPa3OgxLSYGvQ4oPs-Tajw": { <3>
"name": "node_t0", "name": "node_t0",
"ephemeral_id" : "9NlXRFGCT1m8tkvYCMK-8A", "ephemeral_id": "9NlXRFGCT1m8tkvYCMK-8A",
"transport_address": "local[1]", "transport_address": "local[1]",
"attributes": {} "attributes": {}
}, },
"allocation_id": "2iNySv_OQVePRX-yaRH_lQ", <4> "allocation_id": "2iNySv_OQVePRX-yaRH_lQ", <4>
"allocation" : "primary|replica|unused" <5> "allocation": "primary|replica|unused" <5>
"store_exception": ... <6> "store_exception": ... <6>
} }
] ]

View File

@ -14,7 +14,7 @@ existing <<indices-templates, index template>>.
-------------------------------------------------- --------------------------------------------------
PUT _index_template/template_1 PUT _index_template/template_1
{ {
"index_patterns": ["myindex*"], "index_patterns": ["my-index-*"],
"template": { "template": {
"settings": { "settings": {
"number_of_shards": 1 "number_of_shards": 1
@ -33,7 +33,7 @@ DELETE _index_template/*
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /_index_template/_simulate_index/myindex-1 POST /_index_template/_simulate_index/my-index-000001
-------------------------------------------------- --------------------------------------------------
[[simulate-index-api-request]] [[simulate-index-api-request]]
@ -99,7 +99,7 @@ Response includes an empty object if no settings would be applied.
[[simulate-index-api-example]] [[simulate-index-api-example]]
==== {api-examples-title} ==== {api-examples-title}
The following example shows the configuration that would be applied to `myindex-1` by The following example shows the configuration that would be applied to `my-index-000001` by
an existing template. an existing template.
[source,console] [source,console]
@ -131,17 +131,17 @@ PUT /_component_template/ct2 <2>
PUT /_index_template/final-template <3> PUT /_index_template/final-template <3>
{ {
"index_patterns": ["myindex*"], "index_patterns": ["my-index-*"],
"composed_of": ["ct1", "ct2"], "composed_of": ["ct1", "ct2"],
"priority": 5 "priority": 5
} }
POST /_index_template/_simulate_index/myindex-1 <4> POST /_index_template/_simulate_index/my-index-000001 <4>
-------------------------------------------------- --------------------------------------------------
<1> Create a component template (`ct1`) that sets the number of shards to 2 <1> Create a component template (`ct1`) that sets the number of shards to 2
<2> Create a second component template (`ct2`) that sets the number of replicas to 0 and defines a mapping <2> Create a second component template (`ct2`) that sets the number of replicas to 0 and defines a mapping
<3> Create an index template (`final-template`) that uses the component templates <3> Create an index template (`final-template`) that uses the component templates
<4> Show the configuration that would be applied to `myindex-1` <4> Show the configuration that would be applied to `my-index-000001`
The response shows the index settings, mappings, and aliases applied by the `final-template`: The response shows the index settings, mappings, and aliases applied by the `final-template`:
@ -168,7 +168,7 @@ The response shows the index settings, mappings, and aliases applied by the `fin
{ {
"name" : "template_1", "name" : "template_1",
"index_patterns" : [ "index_patterns" : [
"myindex*" "my-index-*"
] ]
} }
] ]

View File

@ -33,7 +33,7 @@ DELETE /_index_template/template_1
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
POST /_index_template/_simulate_index/myindex POST /_index_template/_simulate_index/my-index-000001
-------------------------------------------------- --------------------------------------------------
To simulate the settings that would be applied from an existing template: To simulate the settings that would be applied from an existing template:

View File

@ -204,7 +204,7 @@ PUT /_component_template/ct2 <2>
PUT /_index_template/final-template <3> PUT /_index_template/final-template <3>
{ {
"index_patterns": ["myindex*"], "index_patterns": ["my-index-*"],
"composed_of": ["ct1", "ct2"], "composed_of": ["ct1", "ct2"],
"priority": 5 "priority": 5
} }
@ -256,7 +256,7 @@ The specified template is used for the simulation if it has a higher priority th
-------------------------------------------------- --------------------------------------------------
POST /_index_template/_simulate POST /_index_template/_simulate
{ {
"index_patterns": ["myindex*"], "index_patterns": ["my-index-*"],
"composed_of": ["ct2"], "composed_of": ["ct2"],
"priority": 10, "priority": 10,
"template": { "template": {
@ -292,7 +292,7 @@ The response shows any overlapping templates with a lower priority.
{ {
"name" : "final-template", "name" : "final-template",
"index_patterns" : [ "index_patterns" : [
"myindex*" "my-index-*"
] ]
} }
] ]

View File

@ -48,7 +48,7 @@ Index with defined pipeline
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my-index/_doc/my-id?pipeline=my_pipeline_id PUT my-index-00001/_doc/my-id?pipeline=my_pipeline_id
{ {
"foo": "bar" "foo": "bar"
} }
@ -60,7 +60,7 @@ Response
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"_index" : "my-index", "_index" : "my-index-00001",
"_type" : "_doc", "_type" : "_doc",
"_id" : "my-id", "_id" : "my-id",
"_version" : 1, "_version" : 1,

View File

@ -571,7 +571,7 @@ include the `field` specified in your enrich processor.
[source,console] [source,console]
---- ----
PUT /my_index/_doc/my_id?pipeline=user_lookup PUT /my-index-00001/_doc/my_id?pipeline=user_lookup
{ {
"email": "mardy.brown@asciidocsmith.com" "email": "mardy.brown@asciidocsmith.com"
} }
@ -583,7 +583,7 @@ use the <<docs-get,get API>> to view the indexed document.
[source,console] [source,console]
---- ----
GET /my_index/_doc/my_id GET /my-index-00001/_doc/my_id
---- ----
// TEST[continued] // TEST[continued]
@ -593,7 +593,7 @@ The API returns the following response:
---- ----
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id", "_id": "my_id",
"_version": 1, "_version": 1,

View File

@ -13,7 +13,7 @@ the provided index name prefix and the provided date rounding get formatted into
Also here optionally date formatting can be specified on how the date should be formatted into a date math index name Also here optionally date formatting can be specified on how the date should be formatted into a date math index name
expression. expression.
An example pipeline that points documents to a monthly index that starts with a `myindex-` prefix based on a An example pipeline that points documents to a monthly index that starts with a `my-index-` prefix based on a
date in the `date1` field: date in the `date1` field:
[source,console] [source,console]
@ -25,7 +25,7 @@ PUT _ingest/pipeline/monthlyindex
{ {
"date_index_name" : { "date_index_name" : {
"field" : "date1", "field" : "date1",
"index_name_prefix" : "myindex-", "index_name_prefix" : "my-index-",
"date_rounding" : "M" "date_rounding" : "M"
} }
} }
@ -38,7 +38,7 @@ Using that pipeline for an index request:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /myindex/_doc/1?pipeline=monthlyindex PUT /my-index/_doc/1?pipeline=monthlyindex
{ {
"date1" : "2016-04-25T12:02:01.789Z" "date1" : "2016-04-25T12:02:01.789Z"
} }
@ -48,7 +48,7 @@ PUT /myindex/_doc/1?pipeline=monthlyindex
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"_index" : "myindex-2016-04-01", "_index" : "my-index-2016-04-01",
"_type" : "_doc", "_type" : "_doc",
"_id" : "1", "_id" : "1",
"_version" : 1, "_version" : 1,
@ -65,11 +65,11 @@ PUT /myindex/_doc/1?pipeline=monthlyindex
// TESTRESPONSE[s/"_seq_no" : \d+/"_seq_no" : $body._seq_no/ s/"_primary_term" : 1/"_primary_term" : $body._primary_term/] // TESTRESPONSE[s/"_seq_no" : \d+/"_seq_no" : $body._seq_no/ s/"_primary_term" : 1/"_primary_term" : $body._primary_term/]
The above request will not index this document into the `myindex` index, but into the `myindex-2016-04-01` index because The above request will not index this document into the `my-index` index, but into the `my-index-2016-04-01` index because
it was rounded by month. This is because the date-index-name-processor overrides the `_index` property of the document. it was rounded by month. This is because the date-index-name-processor overrides the `_index` property of the document.
To see the date-math value of the index supplied in the actual index request which resulted in the above document being To see the date-math value of the index supplied in the actual index request which resulted in the above document being
indexed into `myindex-2016-04-01` we can inspect the effects of the processor using a simulate request. indexed into `my-index-2016-04-01` we can inspect the effects of the processor using a simulate request.
[source,console] [source,console]
@ -83,7 +83,7 @@ POST _ingest/pipeline/_simulate
{ {
"date_index_name" : { "date_index_name" : {
"field" : "date1", "field" : "date1",
"index_name_prefix" : "myindex-", "index_name_prefix" : "my-index-",
"date_rounding" : "M" "date_rounding" : "M"
} }
} }
@ -108,7 +108,7 @@ and the result:
{ {
"doc" : { "doc" : {
"_id" : "_id", "_id" : "_id",
"_index" : "<myindex-{2016-04-25||/M{yyyy-MM-dd|UTC}}>", "_index" : "<my-index-{2016-04-25||/M{yyyy-MM-dd|UTC}}>",
"_type" : "_doc", "_type" : "_doc",
"_source" : { "_source" : {
"date1" : "2016-04-25T12:02:01.789Z" "date1" : "2016-04-25T12:02:01.789Z"
@ -123,7 +123,7 @@ and the result:
-------------------------------------------------- --------------------------------------------------
// TESTRESPONSE[s/2016-11-08T19:43:03.850\+0000/$body.docs.0.doc._ingest.timestamp/] // TESTRESPONSE[s/2016-11-08T19:43:03.850\+0000/$body.docs.0.doc._ingest.timestamp/]
The above example shows that `_index` was set to `<myindex-{2016-04-25||/M{yyyy-MM-dd|UTC}}>`. Elasticsearch The above example shows that `_index` was set to `<my-index-{2016-04-25||/M{yyyy-MM-dd|UTC}}>`. Elasticsearch
understands this to mean `2016-04-01` as is explained in the <<date-math-index-names, date math index name documentation>> understands this to mean `2016-04-01` as is explained in the <<date-math-index-names, date math index name documentation>>
[[date-index-name-options]] [[date-index-name-options]]

View File

@ -55,11 +55,11 @@ PUT _ingest/pipeline/geoip
} }
] ]
} }
PUT my_index/_doc/my_id?pipeline=geoip PUT my-index-00001/_doc/my_id?pipeline=geoip
{ {
"ip": "8.8.8.8" "ip": "8.8.8.8"
} }
GET my_index/_doc/my_id GET my-index-00001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
Which returns: Which returns:
@ -68,7 +68,7 @@ Which returns:
-------------------------------------------------- --------------------------------------------------
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id", "_id": "my_id",
"_version": 1, "_version": 1,
@ -105,11 +105,11 @@ PUT _ingest/pipeline/geoip
} }
] ]
} }
PUT my_index/_doc/my_id?pipeline=geoip PUT my-index-00001/_doc/my_id?pipeline=geoip
{ {
"ip": "8.8.8.8" "ip": "8.8.8.8"
} }
GET my_index/_doc/my_id GET my-index-00001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
returns this: returns this:
@ -118,7 +118,7 @@ returns this:
-------------------------------------------------- --------------------------------------------------
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-00001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id", "_id": "my_id",
"_version": 1, "_version": 1,
@ -156,12 +156,12 @@ PUT _ingest/pipeline/geoip
] ]
} }
PUT my_index/_doc/my_id?pipeline=geoip PUT my-index-00001/_doc/my_id?pipeline=geoip
{ {
"ip": "80.231.5.0" "ip": "80.231.5.0"
} }
GET my_index/_doc/my_id GET my-index-00001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
Which returns: Which returns:
@ -169,7 +169,7 @@ Which returns:
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"_index" : "my_index", "_index" : "my-index-00001",
"_type" : "_doc", "_type" : "_doc",
"_id" : "my_id", "_id" : "my_id",
"_version" : 1, "_version" : 1,

View File

@ -72,7 +72,7 @@ from the outer pipeline:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT /myindex/_doc/1?pipeline=pipelineB PUT /my-index/_doc/1?pipeline=pipelineB
{ {
"field": "value" "field": "value"
} }
@ -84,7 +84,7 @@ Response from the index request:
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"_index": "myindex", "_index": "my-index",
"_type": "_doc", "_type": "_doc",
"_id": "1", "_id": "1",
"_version": 1, "_version": 1,

View File

@ -43,19 +43,19 @@ numeric fields `field_a` and `field_b` multiplied by the parameter param_c:
// NOTCONSOLE // NOTCONSOLE
It is possible to use the Script Processor to manipulate document metadata like `_index` and `_type` during It is possible to use the Script Processor to manipulate document metadata like `_index` and `_type` during
ingestion. Here is an example of an Ingest Pipeline that renames the index and type to `my_index` no matter what ingestion. Here is an example of an Ingest Pipeline that renames the index and type to `my-index` no matter what
was provided in the original index request: was provided in the original index request:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT _ingest/pipeline/my_index PUT _ingest/pipeline/my-index
{ {
"description": "use index:my_index", "description": "use index:my-index",
"processors": [ "processors": [
{ {
"script": { "script": {
"source": """ "source": """
ctx._index = 'my_index'; ctx._index = 'my-index';
ctx._type = '_doc'; ctx._type = '_doc';
""" """
} }
@ -64,11 +64,11 @@ PUT _ingest/pipeline/my_index
} }
-------------------------------------------------- --------------------------------------------------
Using the above pipeline, we can attempt to index a document into the `any_index` index. Using the above pipeline, we can attempt to index a document into the `any-index` index.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT any_index/_doc/1?pipeline=my_index PUT any-index/_doc/1?pipeline=my-index
{ {
"message": "text" "message": "text"
} }
@ -80,7 +80,7 @@ The response from the above index request:
[source,console-result] [source,console-result]
-------------------------------------------------- --------------------------------------------------
{ {
"_index": "my_index", "_index": "my-index",
"_type": "_doc", "_type": "_doc",
"_id": "1", "_id": "1",
"_version": 1, "_version": 1,
@ -96,6 +96,6 @@ The response from the above index request:
-------------------------------------------------- --------------------------------------------------
// TESTRESPONSE[s/"_seq_no": \d+/"_seq_no" : $body._seq_no/ s/"_primary_term" : 1/"_primary_term" : $body._primary_term/] // TESTRESPONSE[s/"_seq_no": \d+/"_seq_no" : $body._seq_no/ s/"_primary_term" : 1/"_primary_term" : $body._primary_term/]
In the above response, you can see that our document was actually indexed into `my_index` instead of In the above response, you can see that our document was actually indexed into `my-index` instead of
`any_index`. This type of manipulation is often convenient in pipelines that have various branches of transformation, `any-index`. This type of manipulation is often convenient in pipelines that have various branches of transformation,
and depending on the progress made, indexed into different indices. and depending on the progress made, indexed into different indices.

View File

@ -37,11 +37,11 @@ PUT _ingest/pipeline/user_agent
} }
] ]
} }
PUT my_index/_doc/my_id?pipeline=user_agent PUT my-index-000001/_doc/my_id?pipeline=user_agent
{ {
"agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
} }
GET my_index/_doc/my_id GET my-index-000001/_doc/my_id
-------------------------------------------------- --------------------------------------------------
Which returns Which returns
@ -50,7 +50,7 @@ Which returns
-------------------------------------------------- --------------------------------------------------
{ {
"found": true, "found": true,
"_index": "my_index", "_index": "my-index-000001",
"_type": "_doc", "_type": "_doc",
"_id": "my_id", "_id": "my_id",
"_version": 1, "_version": 1,

View File

@ -145,7 +145,7 @@ with an explicit mapping.
[source,console] [source,console]
---- ----
PUT /my-index PUT /my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -174,7 +174,7 @@ for the `employee-id` field are stored but not indexed or available for search.
[source,console] [source,console]
---- ----
PUT /my-index/_mapping PUT /my-index-000001/_mapping
{ {
"properties": { "properties": {
"employee-id": { "employee-id": {
@ -203,7 +203,7 @@ an existing index.
[source,console] [source,console]
---- ----
GET /my-index/_mapping GET /my-index-000001/_mapping
---- ----
// TEST[continued] // TEST[continued]
@ -212,7 +212,7 @@ The API returns the following response:
[source,console-result] [source,console-result]
---- ----
{ {
"my-index" : { "my-index-000001" : {
"mappings" : { "mappings" : {
"properties" : { "properties" : {
"age" : { "age" : {
@ -249,7 +249,7 @@ The following request retrieves the mapping for the `employee-id` field.
[source,console] [source,console]
---- ----
GET /my-index/_mapping/field/employee-id GET /my-index-000001/_mapping/field/employee-id
---- ----
// TEST[continued] // TEST[continued]
@ -258,7 +258,7 @@ The API returns the following response:
[source,console-result] [source,console-result]
---- ----
{ {
"my-index" : { "my-index-000001" : {
"mappings" : { "mappings" : {
"employee-id" : { "employee-id" : {
"full_name" : "employee-id", "full_name" : "employee-id",

View File

@ -48,12 +48,12 @@ For example:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"create_date": "2015/09/02" "create_date": "2015/09/02"
} }
GET my_index/_mapping <1> GET my-index-000001/_mapping <1>
-------------------------------------------------- --------------------------------------------------
<1> The `create_date` field has been added as a <<date,`date`>> <1> The `create_date` field has been added as a <<date,`date`>>
@ -66,14 +66,14 @@ Dynamic date detection can be disabled by setting `date_detection` to `false`:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"date_detection": false "date_detection": false
} }
} }
PUT my_index/_doc/1 <1> PUT my-index-000001/_doc/1 <1>
{ {
"create": "2015/09/02" "create": "2015/09/02"
} }
@ -88,14 +88,14 @@ own <<mapping-date-format,date formats>>:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_date_formats": ["MM/dd/yyyy"] "dynamic_date_formats": ["MM/dd/yyyy"]
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"create_date": "09/25/2015" "create_date": "09/25/2015"
} }
@ -113,14 +113,14 @@ correct solution is to map these fields explicitly, but numeric detection
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"numeric_detection": true "numeric_detection": true
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"my_float": "1.0", <1> "my_float": "1.0", <1>
"my_integer": "1" <2> "my_integer": "1" <2>

View File

@ -83,7 +83,7 @@ could use the following template:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -113,7 +113,7 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"my_integer": 5, <1> "my_integer": 5, <1>
"my_string": "Some string" <2> "my_string": "Some string" <2>
@ -137,7 +137,7 @@ fields:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -155,7 +155,7 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"long_num": "5", <1> "long_num": "5", <1>
"long_text": "foo" <2> "long_text": "foo" <2>
@ -191,7 +191,7 @@ top-level `full_name` field, except for the `middle` field:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -209,7 +209,7 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"name": { "name": {
"first": "John", "first": "John",
@ -226,7 +226,7 @@ field `name.title`, which can't be mapped as text:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"name": { "name": {
"first": "Paul", "first": "Paul",
@ -251,7 +251,7 @@ field, and disables <<doc-values,`doc_values`>> for all non-string fields:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -278,7 +278,7 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"english": "Some English text", <1> "english": "Some English text", <1>
"count": 5 <2> "count": 5 <2>
@ -303,7 +303,7 @@ you will have to search on the exact same value that was indexed.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -331,7 +331,7 @@ before 5.0):
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -356,7 +356,7 @@ disable the storage of these scoring factors in the index and save some space.
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [
@ -394,7 +394,7 @@ maybe gain some indexing speed:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic_templates": [ "dynamic_templates": [

View File

@ -11,17 +11,17 @@ The value of the `_id` field is accessible in certain queries (`term`,
[source,console] [source,console]
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"text": "Document with ID 1" "text": "Document with ID 1"
} }
PUT my_index/_doc/2?refresh=true PUT my-index-000001/_doc/2?refresh=true
{ {
"text": "Document with ID 2" "text": "Document with ID 2"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"terms": { "terms": {

View File

@ -7,7 +7,7 @@ metadata, such as the class that a document belongs to:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"_meta": { <1> "_meta": { <1>
@ -29,7 +29,7 @@ The `_meta` field can be updated on an existing type using the
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index/_mapping PUT my-index-000001/_mapping
{ {
"_meta": { "_meta": {
"class": "MyApp2::User3", "class": "MyApp2::User3",

View File

@ -13,12 +13,12 @@ value per document. For instance:
[source,console] [source,console]
------------------------------ ------------------------------
PUT my_index/_doc/1?routing=user1&refresh=true <1> PUT my-index-000001/_doc/1?routing=user1&refresh=true <1>
{ {
"title": "This is a document" "title": "This is a document"
} }
GET my_index/_doc/1?routing=user1 <2> GET my-index-000001/_doc/1?routing=user1 <2>
------------------------------ ------------------------------
// TESTSETUP // TESTSETUP
@ -31,7 +31,7 @@ The value of the `_routing` field is accessible in queries:
[source,console] [source,console]
-------------------------- --------------------------
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"terms": { "terms": {
@ -54,7 +54,7 @@ just the shard that matches the specific routing value (or values):
[source,console] [source,console]
------------------------------ ------------------------------
GET my_index/_search?routing=user1,user2 <1> GET my-index-000001/_search?routing=user1,user2 <1>
{ {
"query": { "query": {
"match": { "match": {
@ -79,7 +79,7 @@ custom `routing` value required for all CRUD operations:
[source,console] [source,console]
------------------------------ ------------------------------
PUT my_index2 PUT my-index-000002
{ {
"mappings": { "mappings": {
"_routing": { "_routing": {
@ -88,7 +88,7 @@ PUT my_index2
} }
} }
PUT my_index2/_doc/1 <2> PUT my-index-000002/_doc/1 <2>
{ {
"text": "No routing value provided" "text": "No routing value provided"
} }

View File

@ -14,12 +14,12 @@ scripts, and when sorting:
-------------------------- --------------------------
# Example documents # Example documents
PUT my_index/_doc/1?refresh=true PUT my-index-000001/_doc/1?refresh=true
{ {
"text": "Document with type 'doc'" "text": "Document with type 'doc'"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"term": { "term": {

View File

@ -33,7 +33,7 @@ To disable stop words for phrases a field utilising three analyzer settings will
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"settings":{ "settings":{
"analysis":{ "analysis":{
@ -74,17 +74,17 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"title":"The Quick Brown Fox" "title":"The Quick Brown Fox"
} }
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"title":"A Quick Brown Fox" "title":"A Quick Brown Fox"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query":{ "query":{
"query_string":{ "query_string":{

View File

@ -6,7 +6,7 @@ Individual fields can be _boosted_ automatically -- count more towards the relev
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {

View File

@ -17,7 +17,7 @@ For instance:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -32,12 +32,12 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"number_one": "10" <1> "number_one": "10" <1>
} }
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"number_two": "10" <2> "number_two": "10" <2>
} }
@ -58,7 +58,7 @@ coercion globally across all mapping types:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.mapping.coerce": false "index.mapping.coerce": false
@ -76,10 +76,10 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ "number_one": "10" } <1> { "number_one": "10" } <1>
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ "number_two": "10" } <2> { "number_two": "10" } <2>
-------------------------------------------------- --------------------------------------------------
// TEST[catch:bad_request] // TEST[catch:bad_request]

View File

@ -8,7 +8,7 @@ the `full_name` field as follows:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -27,13 +27,13 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"first_name": "John", "first_name": "John",
"last_name": "Smith" "last_name": "Smith"
} }
GET my_index/_search GET my-index-000001/_search
{ {
"query": { "query": {
"match": { "match": {

View File

@ -23,7 +23,7 @@ value from a script, you can disable doc values in order to save disk space:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {

View File

@ -7,7 +7,7 @@ containing the new field. For instance:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index/_doc/1 <1> PUT my-index-000001/_doc/1 <1>
{ {
"username": "johnsmith", "username": "johnsmith",
"name": { "name": {
@ -16,9 +16,9 @@ PUT my_index/_doc/1 <1>
} }
} }
GET my_index/_mapping <2> GET my-index-000001/_mapping <2>
PUT my_index/_doc/2 <3> PUT my-index-000001/_doc/2 <3>
{ {
"username": "marywhite", "username": "marywhite",
"email": "mary@white.com", "email": "mary@white.com",
@ -29,7 +29,7 @@ PUT my_index/_doc/2 <3>
} }
} }
GET my_index/_mapping <4> GET my-index-000001/_mapping <4>
-------------------------------------------------- --------------------------------------------------
<1> This document introduces the string field `username`, the object field <1> This document introduces the string field `username`, the object field
@ -58,7 +58,7 @@ object or from the mapping type. For instance:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"dynamic": false, <1> "dynamic": false, <1>

View File

@ -51,7 +51,7 @@ aggregations:
[source,console] [source,console]
------------ ------------
PUT my_index/_mapping PUT my-index-000001/_mapping
{ {
"properties": { "properties": {
"tags": { "tags": {
@ -61,7 +61,7 @@ PUT my_index/_mapping
} }
} }
------------ ------------
// TEST[s/^/PUT my_index\n/] // TEST[s/^/PUT my-index-000001\n/]
When `eager_global_ordinals` is enabled, global ordinals are built when a shard When `eager_global_ordinals` is enabled, global ordinals are built when a shard
is <<indices-refresh, refreshed>> -- Elasticsearch always loads them before is <<indices-refresh, refreshed>> -- Elasticsearch always loads them before
@ -74,7 +74,7 @@ Eager loading can be disabled at any time by updating the `eager_global_ordinals
[source,console] [source,console]
------------ ------------
PUT my_index/_mapping PUT my-index-000001/_mapping
{ {
"properties": { "properties": {
"tags": { "tags": {

View File

@ -15,7 +15,7 @@ stored in any other way:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -33,7 +33,7 @@ PUT my_index
} }
} }
PUT my_index/_doc/session_1 PUT my-index-000001/_doc/session_1
{ {
"user_id": "kimchy", "user_id": "kimchy",
"session_data": { <2> "session_data": { <2>
@ -44,7 +44,7 @@ PUT my_index/_doc/session_1
"last_updated": "2015-12-06T18:20:22" "last_updated": "2015-12-06T18:20:22"
} }
PUT my_index/_doc/session_2 PUT my-index-000001/_doc/session_2
{ {
"user_id": "jpountz", "user_id": "jpountz",
"session_data": "none", <3> "session_data": "none", <3>
@ -62,14 +62,14 @@ retrieved, but none of its contents are indexed in any way:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"enabled": false <1> "enabled": false <1>
} }
} }
PUT my_index/_doc/session_1 PUT my-index-000001/_doc/session_1
{ {
"user_id": "kimchy", "user_id": "kimchy",
"session_data": { "session_data": {
@ -80,9 +80,9 @@ PUT my_index/_doc/session_1
"last_updated": "2015-12-06T18:20:22" "last_updated": "2015-12-06T18:20:22"
} }
GET my_index/_doc/session_1 <2> GET my-index-000001/_doc/session_1 <2>
GET my_index/_mapping <3> GET my-index-000001/_mapping <3>
-------------------------------------------------- --------------------------------------------------
<1> The entire mapping is disabled. <1> The entire mapping is disabled.
@ -97,7 +97,7 @@ contents, it is possible to add non-object data to a disabled field:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -109,7 +109,7 @@ PUT my_index
} }
} }
PUT my_index/_doc/session_1 PUT my-index-000001/_doc/session_1
{ {
"session_data": "foo bar" <1> "session_data": "foo bar" <1>
} }

View File

@ -54,7 +54,7 @@ enabled for aggregations, as follows:
[source,console] [source,console]
--------------------------------- ---------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -82,7 +82,7 @@ You can enable fielddata on an existing `text` field using the
[source,console] [source,console]
----------------------------------- -----------------------------------
PUT my_index/_mapping PUT my-index-000001/_mapping
{ {
"properties": { "properties": {
"my_field": { <1> "my_field": { <1>
@ -115,7 +115,7 @@ number of docs that the segment should contain with `min_segment_size`:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {

View File

@ -11,7 +11,7 @@ Besides the <<built-in-date-formats,built-in formats>>, your own
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {

View File

@ -8,7 +8,7 @@ NOTE: All strings/array elements will still be present in the `_source` field, i
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -20,17 +20,17 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 <2> PUT my-index-000001/_doc/1 <2>
{ {
"message": "Syntax error" "message": "Syntax error"
} }
PUT my_index/_doc/2 <3> PUT my-index-000001/_doc/2 <3>
{ {
"message": "Syntax error with some long stacktrace" "message": "Syntax error with some long stacktrace"
} }
GET my_index/_search <4> GET my-index-000001/_search <4>
{ {
"aggs": { "aggs": {
"messages": { "messages": {

View File

@ -14,7 +14,7 @@ For example:
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"mappings": { "mappings": {
"properties": { "properties": {
@ -29,13 +29,13 @@ PUT my_index
} }
} }
PUT my_index/_doc/1 PUT my-index-000001/_doc/1
{ {
"text": "Some text value", "text": "Some text value",
"number_one": "foo" <1> "number_one": "foo" <1>
} }
PUT my_index/_doc/2 PUT my-index-000001/_doc/2
{ {
"text": "Some text value", "text": "Some text value",
"number_two": "foo" <2> "number_two": "foo" <2>
@ -67,7 +67,7 @@ Mapping types that don't support the setting will ignore it if set on the index
[source,console] [source,console]
-------------------------------------------------- --------------------------------------------------
PUT my_index PUT my-index-000001
{ {
"settings": { "settings": {
"index.mapping.ignore_malformed": true <1> "index.mapping.ignore_malformed": true <1>

Some files were not shown because too many files have changed in this diff Show More