Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more include_type_name and types from docs #37601

Merged
merged 2 commits into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions docs/painless/painless-execute-script.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ index:: The name of an index containing a mapping that is compatible with the do

[source,js]
----------------------------------------------------------------
PUT /my-index?include_type_name=true
PUT /my-index
{
"mappings": {
"_doc": {
"properties": {
"field": {
"type": "keyword"
}
"properties": {
"field": {
"type": "keyword"
}
}
}
Expand Down Expand Up @@ -129,17 +127,15 @@ query:: If `_score` is used in the script then a query can specified that will b

[source,js]
----------------------------------------------------------------
PUT /my-index?include_type_name=true
PUT /my-index
{
"mappings": {
"_doc": {
"properties": {
"field": {
"type": "keyword"
},
"rank": {
"type": "long"
}
"properties": {
"field": {
"type": "keyword"
},
"rank": {
"type": "long"
}
}
}
Expand Down
38 changes: 18 additions & 20 deletions docs/plugins/analysis-icu.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Here are two examples, the default usage and a customised character filter:

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index": {
Expand Down Expand Up @@ -112,7 +112,7 @@ using custom rules to break Myanmar and Khmer text into syllables.

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index": {
Expand Down Expand Up @@ -153,7 +153,7 @@ Then create an analyzer to use this rule file as follows:

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index":{
Expand Down Expand Up @@ -221,7 +221,7 @@ Here are two examples, the default usage and a customised token filter:

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index": {
Expand Down Expand Up @@ -267,7 +267,7 @@ available to all indices:

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index": {
Expand Down Expand Up @@ -301,7 +301,7 @@ these filtered character are not lowercased which is why we add the

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index": {
Expand Down Expand Up @@ -354,21 +354,19 @@ Below is an example of how to set up a field for sorting German names in

[source,js]
--------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"name": { <1>
"type": "text",
"fields": {
"sort": { <2>
"type": "icu_collation_keyword",
"index": false,
"language": "de",
"country": "DE",
"variant": "@collation=phonebook"
}
"properties": {
"name": { <1>
"type": "text",
"fields": {
"sort": { <2>
"type": "icu_collation_keyword",
"index": false,
"language": "de",
"country": "DE",
"variant": "@collation=phonebook"
}
}
}
Expand Down Expand Up @@ -503,7 +501,7 @@ For example:

[source,js]
--------------------------------------------------
PUT icu_sample?include_type_name=true
PUT icu_sample
{
"settings": {
"index": {
Expand Down
32 changes: 14 additions & 18 deletions docs/plugins/mapper-annotated-text.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ the search index:

[source,js]
--------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"my_field": {
"type": "annotated_text"
}
"properties": {
"my_field": {
"type": "annotated_text"
}
}
}
Expand Down Expand Up @@ -168,20 +166,18 @@ sense to include them in dedicated structured fields to support discovery via ag

[source,js]
--------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"my_unstructured_text_field": {
"type": "annotated_text"
},
"my_structured_people_field": {
"type": "text",
"fields": {
"keyword" :{
"type": "keyword"
}
"properties": {
"my_unstructured_text_field": {
"type": "annotated_text"
},
"my_structured_people_field": {
"type": "text",
"fields": {
"keyword" : {
"type": "keyword"
}
}
}
Expand Down
16 changes: 7 additions & 9 deletions docs/plugins/mapper-murmur3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ value and its hash are stored in the index:

[source,js]
--------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"my_field": {
"type": "keyword",
"fields": {
"hash": {
"type": "murmur3"
}
"properties": {
"my_field": {
"type": "keyword",
"fields": {
"hash": {
"type": "murmur3"
}
}
}
Expand Down
8 changes: 3 additions & 5 deletions docs/plugins/mapper-size.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ In order to enable the `_size` field, set the mapping as follows:

[source,js]
--------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"mappings": {
"_doc": {
"_size": {
"enabled": true
}
"_size": {
"enabled": true
}
}
}
Expand Down
14 changes: 6 additions & 8 deletions docs/reference/aggregations/bucket/children-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ For example, let's say we have an index of questions and answers. The answer typ

[source,js]
--------------------------------------------------
PUT child_example?include_type_name=true
PUT child_example
{
"mappings": {
"_doc": {
"properties": {
"join": {
"type": "join",
"relations": {
"question": "answer"
}
"properties": {
"join": {
"type": "join",
"relations": {
"question": "answer"
}
}
}
Expand Down
36 changes: 17 additions & 19 deletions docs/reference/aggregations/bucket/composite-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,27 @@ a composite bucket.

[source,js]
--------------------------------------------------
PUT /sales?include_type_name=true
PUT /sales
{
"mappings": {
"_doc": {
"properties": {
"product": {
"type": "keyword"
},
"timestamp": {
"type": "date"
},
"price": {
"type": "long"
},
"shop": {
"type": "keyword"
}
}
}
"mappings": {
"properties": {
"product": {
"type": "keyword"
},
"timestamp": {
"type": "date"
},
"price": {
"type": "long"
},
"shop": {
"type": "keyword"
}
}
}
}

POST /sales/_doc/_bulk?refresh
POST /sales/_bulk?refresh
{"index":{"_id":0}}
{"product": "mad max", "price": "20", "timestamp": "2017-05-09T14:35"}
{"index":{"_id":1}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ A multi-bucket aggregation that works on `geo_point` fields and conceptually wor

[source,js]
--------------------------------------------------
PUT /museums?include_type_name=true
PUT /museums
{
"mappings": {
"_doc": {
"properties": {
"location": {
"type": "geo_point"
}
"properties": {
"location": {
"type": "geo_point"
}
}
}
}

POST /museums/_doc/_bulk?refresh
POST /museums/_bulk?refresh
{"index":{"_id":1}}
{"location": "52.374081,4.912350", "name": "NEMO Science Museum"}
{"index":{"_id":2}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@ The specified field must be of type `geo_point` (which can only be set explicitl

[source,js]
--------------------------------------------------
PUT /museums?include_type_name=true
PUT /museums
{
"mappings": {
"_doc": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
"properties": {
"location": {
"type": "geo_point"
}
}
}
}

POST /museums/_doc/_bulk?refresh
POST /museums/_bulk?refresh
{"index":{"_id":1}}
{"location": "52.374081,4.912350", "name": "NEMO Science Museum"}
{"index":{"_id":2}}
Expand Down
20 changes: 9 additions & 11 deletions docs/reference/aggregations/bucket/parent-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ For example, let's say we have an index of questions and answers. The answer typ

[source,js]
--------------------------------------------------
PUT parent_example?include_type_name=true
PUT parent_example
{
"mappings": {
"_doc": {
"properties": {
"join": {
"type": "join",
"relations": {
"question": "answer"
}
}
}
}
"properties": {
"join": {
"type": "join",
"relations": {
"question": "answer"
}
}
}
}
}
--------------------------------------------------
Expand Down
Loading