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

Prepare synthetic source docs for tech-preview #89358

Merged
merged 1 commit into from
Aug 16, 2022
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
3 changes: 0 additions & 3 deletions docs/reference/mapping/fields/source-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ at index time. The `_source` field itself is not indexed (and thus is not
searchable), but it is stored so that it can be returned when executing
_fetch_ requests, like <<docs-get,get>> or <<search-search,search>>.

ifeval::["{release-state}"=="unreleased"]
If disk usage is important to you then have a look at
<<synthetic-source,synthetic `_source`>> which shrinks disk usage at the cost of
only supporting a subset of mappings and slower fetches or (not recommended)
<<disable-source-field,disabling the `_source` field>> which also shrinks disk
usage but disables many features.

include::synthetic-source.asciidoc[]
endif::[]


[[disable-source-field]]
==== Disabling the `_source` field
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/mapping/fields/synthetic-source.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[synthetic-source]]
==== Synthetic `_source`
==== Synthetic `_source` preview:[]

Though very handy to have around, the source field takes up a significant amount
of space on disk. Instead of storing source documents on disk exactly as you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,8 @@ The search returns the following hit. The value of the `default_metric` field,
----
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,/]

ifeval::["{release-state}"=="unreleased"]
[[aggregate-metric-double-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
`aggregate_metric-double` fields support <<synthetic-source,synthetic `_source`>> in their default
configuration. Synthetic `_source` cannot be used together with <<ignore-malformed,`ignore_malformed`>>.

Expand Down Expand Up @@ -301,5 +300,3 @@ Will become:
}
----
// TEST[s/^/{"_source":/ s/\n$/}/]

endif::[]
4 changes: 1 addition & 3 deletions docs/reference/mapping/types/boolean.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ The following parameters are accepted by `boolean` fields:

Metadata about the field.

ifeval::["{release-state}"=="unreleased"]
[[boolean-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
`boolean` fields support <<synthetic-source,synthetic `_source`>> in their
default configuration. Synthetic `_source` cannot be used together with
<<copy-to,`copy_to`>> or with <<doc-values,`doc_values`>> disabled.
Expand Down Expand Up @@ -249,4 +248,3 @@ Will become:
}
----
// TEST[s/^/{"_source":/ s/\n$/}/]
endif::[]
4 changes: 1 addition & 3 deletions docs/reference/mapping/types/geo-point.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ def lat = doc['location'].lat;
def lon = doc['location'].lon;
--------------------------------------------------

ifeval::["{release-state}"=="unreleased"]
[[geo-point-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
`geo_point` fields support <<synthetic-source,synthetic `_source`>> in their
default configuration. Synthetic `_source` cannot be used together with
<<ignore-malformed,`ignore_malformed`>>, <<copy-to,`copy_to`>>, or with
Expand Down Expand Up @@ -246,4 +245,3 @@ Will become:
}
----
// TEST[s/^/{"_source":/ s/\n$/}/]
endif::[]
5 changes: 1 addition & 4 deletions docs/reference/mapping/types/ip.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ GET my-index-000001/_search
}
--------------------------------------------------

ifeval::["{release-state}"=="unreleased"]
[[ip-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
`ip` fields support <<synthetic-source,synthetic `_source`>> in their default
configuration. Synthetic `_source` cannot be used together with
<<ignore-malformed,`ignore_malformed`>>, <<copy-to,`copy_to`>>, or with
Expand Down Expand Up @@ -192,5 +191,3 @@ Will become:
NOTE: IPv4 addresses are sorted as though they were IPv6 addresses prefixed by
`::ffff:0:0:0/96` as specified by
https://datatracker.ietf.org/doc/html/rfc6144[rfc6144].

endif::[]
5 changes: 1 addition & 4 deletions docs/reference/mapping/types/keyword.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ Dimension fields have the following constraints:
* The field cannot use a <<normalizer,`normalizer`>>.
--

ifeval::["{release-state}"=="unreleased"]
[[keyword-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
`keyword` fields support <<synthetic-source,synthetic `_source`>> in their
default configuration. Synthetic `_source` cannot be used together with
<<ignore-above,`ignore_above`>>, a <<normalizer,`normalizer`>>,
Expand Down Expand Up @@ -212,8 +211,6 @@ Will become:
----
// TEST[s/^/{"_source":/ s/\n$/}/]

endif::[]

include::constant-keyword.asciidoc[]

include::wildcard.asciidoc[]
5 changes: 1 addition & 4 deletions docs/reference/mapping/types/numeric.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ endif::[]
of `scaling_factor` improve accuracy but also increase space requirements.
This parameter is required.

ifeval::["{release-state}"=="unreleased"]
[[numeric-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
All numeric fields except `unsigned_long` support <<synthetic-source,synthetic
`_source`>> in their default configuration. Synthetic `_source` cannot be used
together with <<ignore-malformed,`ignore_malformed`>>, <<copy-to,`copy_to`>>, or
Expand Down Expand Up @@ -293,5 +292,3 @@ Will become:
}
----
// TEST[s/^/{"_source":/ s/\n$/}/]

endif::[]
4 changes: 1 addition & 3 deletions docs/reference/mapping/types/text.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ The following parameters are accepted by `text` fields:

Metadata about the field.

ifeval::["{release-state}"=="unreleased"]
[[text-synthetic-source]]
==== Synthetic source
==== Synthetic source preview:[]
`text` fields support <<synthetic-source,synthetic `_source`>> if they have
a `keyword` sub-field that supports synthetic `_source` and *do not* have
<<copy-to,`copy_to`>>.
Expand Down Expand Up @@ -214,7 +213,6 @@ NOTE: Reordering text fields can have an effect on <<query-dsl-match-query-phras
<<position-increment-gap,`position_increment_gap`>> for more detail. You
can avoid this by making sure the `slop` parameter on the phrase queries
is lower than the `position_increment_gap`. This is the default.
endif::[]

[[fielddata-mapping-param]]
==== `fielddata` mapping parameter
Expand Down