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 "include_type_name" from most places in docs #37556

Closed
wants to merge 4 commits 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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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": {
Copy link
Contributor

@jtibshirani jtibshirani Jan 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To update this example, we'll also need to remove the type name _doc from the mappings definition. In my original PR, I wasn't able to figure out a good way to do this programmatically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I was under the false impression that the parameter was added solely to prevent failing docs-tests.
In that case probably large parts of this PR are void, but I think at least a huge chunk of the cases e.g. under "analysis" don't touch mappings at all, so I'll see if I can skim these quickly and maybe just restrict the PR to those simple cases.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ a composite bucket.

[source,js]
--------------------------------------------------
PUT /sales?include_type_name=true
PUT /sales
{
"mappings": {
"_doc": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Response:
}
}
--------------------------------------------------
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ The default value is 100.
===== Cannot be nested under `breadth_first` aggregations
Being a quality-based filter the sampler aggregation needs access to the relevance score produced for each document.
It therefore cannot be nested under a `terms` aggregation which has the `collect_mode` switched from the default `depth_first` mode to `breadth_first` as this discards scores.
In this situation an error will be thrown.
In this situation an error will be thrown.
2 changes: 1 addition & 1 deletion docs/reference/aggregations/matrix.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ experimental[]
The aggregations in this family operate on multiple fields and produce a matrix result based on the values extracted from
the requested document fields. Unlike metric and bucket aggregations, this aggregation family does not yet support scripting.

include::matrix/stats-aggregation.asciidoc[]
include::matrix/stats-aggregation.asciidoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Example:

[source,js]
--------------------------------------------------
PUT /museums?include_type_name=true
PUT /museums
{
"mappings": {
"_doc": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Example:

[source,js]
--------------------------------------------------
PUT /museums?include_type_name=true
PUT /museums
{
"mappings": {
"_doc": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Let's see how it works with a real sample. Considering the following mapping:

[source,js]
--------------------------------------------------
PUT /sales?include_type_name=true
PUT /sales
{
"mappings": {
"_doc" : {
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/analysis.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Each <<text,`text`>> field in a mapping can specify its own

[source,js]
-------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"mappings": {
"_doc": {
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/analysis/analyzers/configuring.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ to support a list of stop words:

[source,js]
--------------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"settings": {
"analysis": {
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/analysis/analyzers/custom-analyzer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Token Filters::

[source,js]
--------------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"settings": {
"analysis": {
Expand Down Expand Up @@ -157,7 +157,7 @@ Here is an example:

[source,js]
--------------------------------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"settings": {
"analysis": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pre-defined list of English stop words:

[source,js]
----------------------------
PUT my_index?include_type_name=true
PUT my_index
{
"settings": {
"analysis": {
Expand Down Expand Up @@ -158,7 +158,7 @@ customization:

[source,js]
----------------------------------------------------
PUT /fingerprint_example?include_type_name=true
PUT /fingerprint_example
{
"settings": {
"analysis": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for further customization:

[source,js]
----------------------------------------------------
PUT /keyword_example?include_type_name=true
PUT /keyword_example
{
"settings": {
"analysis": {
Expand Down
Loading