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

Start moving docs to typeless APIs. #33953

Closed
wants to merge 1 commit into from
Closed
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
394 changes: 198 additions & 196 deletions docs/build.gradle

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Example:

[source,js]
--------------------------------------------------
PUT /emails/_doc/_bulk?refresh
PUT /emails/_bulk?refresh&include_type_name=false
{ "index" : { "_id" : 1 } }
{ "accounts" : ["hillary", "sidney"]}
{ "index" : { "_id" : 2 } }
{ "accounts" : ["hillary", "donald"]}
{ "index" : { "_id" : 3 } }
{ "accounts" : ["vladimir", "donald"]}

GET emails/_search
GET emails/_search?include_type_name=false
{
"size": 0,
"aggs" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Requesting a target of 10 buckets.

[source,js]
--------------------------------------------------
POST /sales/_search?size=0
POST /sales/_search?size=0&include_type_name=false
{
"aggs" : {
"sales_over_time" : {
Expand All @@ -39,7 +39,7 @@ TIP: If no `format` is specified, then it will use the first date

[source,js]
--------------------------------------------------
POST /sales/_search?size=0
POST /sales/_search?size=0&include_type_name=false
{
"aggs" : {
"sales_over_time" : {
Expand Down Expand Up @@ -121,22 +121,22 @@ Consider the following example:

[source,js]
---------------------------------
PUT my_index/log/1?refresh
PUT my_index/_doc/1?refresh&include_type_name=false
{
"date": "2015-10-01T00:30:00Z"
}

PUT my_index/log/2?refresh
PUT my_index/_doc/2?refresh&include_type_name=false
{
"date": "2015-10-01T01:30:00Z"
}

PUT my_index/log/3?refresh
PUT my_index/_doc/3?refresh&include_type_name=false
{
"date": "2015-10-01T02:30:00Z"
}

GET my_index/_search?size=0
GET my_index/_search?size=0&include_type_name=false
{
"aggs": {
"by_day": {
Expand Down Expand Up @@ -188,7 +188,7 @@ midnight UTC:

[source,js]
---------------------------------
GET my_index/_search?size=0
GET my_index/_search?size=0&include_type_name=false
{
"aggs": {
"by_day": {
Expand Down Expand Up @@ -266,7 +266,7 @@ had a value.

[source,js]
--------------------------------------------------
POST /sales/_search?size=0
POST /sales/_search?size=0&include_type_name=false
{
"aggs" : {
"sale_date" : {
Expand Down
22 changes: 10 additions & 12 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
PUT child_example?include_type_name=false
{
"mappings": {
"_doc": {
"properties": {
"join": {
"type": "join",
"relations": {
"question": "answer"
}
"properties": {
"join": {
"type": "join",
"relations": {
"question": "answer"
}
}
}
Expand All @@ -37,7 +35,7 @@ An example of a question document:

[source,js]
--------------------------------------------------
PUT child_example/_doc/1
PUT child_example/_doc/1?include_type_name=false
{
"join": {
"name": "question"
Expand All @@ -58,7 +56,7 @@ Examples of `answer` documents:

[source,js]
--------------------------------------------------
PUT child_example/_doc/2?routing=1
PUT child_example/_doc/2?routing=1&include_type_name=false
{
"join": {
"name": "answer",
Expand All @@ -73,7 +71,7 @@ PUT child_example/_doc/2?routing=1
"creation_date": "2009-05-04T13:45:37.030"
}

PUT child_example/_doc/3?routing=1&refresh
PUT child_example/_doc/3?routing=1&refresh&include_type_name=false
{
"join": {
"name": "answer",
Expand All @@ -95,7 +93,7 @@ The following request can be built that connects the two together:

[source,js]
--------------------------------------------------
POST child_example/_search?size=0
POST child_example/_search?size=0&include_type_name=false
{
"aggs": {
"top-tags": {
Expand Down
56 changes: 27 additions & 29 deletions docs/reference/aggregations/bucket/composite-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,27 @@ a composite bucket.

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

POST /sales/docs/_bulk?refresh
POST /sales/_bulk?refresh&include_type_name=false
{"index":{"_id":0}}
{"product": "mad max", "price": "20", "timestamp": "2017-05-09T14:35"}
{"index":{"_id":1}}
Expand Down Expand Up @@ -96,7 +94,7 @@ Example:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand All @@ -115,7 +113,7 @@ Like the `terms` aggregation it is also possible to use a script to create the v

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -150,7 +148,7 @@ Example:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand All @@ -169,7 +167,7 @@ The values are built from a numeric field or a script that return numerical valu

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -202,7 +200,7 @@ is specified by date/time expression:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -232,7 +230,7 @@ the format specified with the format parameter:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -275,7 +273,7 @@ For example:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand All @@ -299,7 +297,7 @@ in the composite buckets.

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -329,7 +327,7 @@ For example:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand All @@ -356,7 +354,7 @@ It is possible to include them in the response by setting `missing_bucket` to

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -396,7 +394,7 @@ For example:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -462,7 +460,7 @@ round of result can be retrieved with:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down Expand Up @@ -492,7 +490,7 @@ per composite bucket:

[source,js]
--------------------------------------------------
GET /_search
GET /_search?include_type_name=false
{
"aggs" : {
"my_buckets": {
Expand Down
Loading