|
@@ -249,13 +249,21 @@ of official GA features.
|
|
|
`range` fields support <<synthetic-source,synthetic `_source`>> in their default
|
|
|
configuration. Synthetic `_source` cannot be used with <<doc-values,`doc_values`>> disabled.
|
|
|
|
|
|
-Synthetic source always sorts values and removes duplicates for all `range` fields except `ip_range` . Ranges are sorted by their lower bound and then by upper bound. For example:
|
|
|
+Synthetic source always sorts values and removes duplicates for all `range` fields except `ip_range`. Ranges are sorted by their lower bound and then by upper bound. For example:
|
|
|
[source,console,id=synthetic-source-range-sorting-example]
|
|
|
----
|
|
|
PUT idx
|
|
|
{
|
|
|
+ "settings": {
|
|
|
+ "index": {
|
|
|
+ "mapping": {
|
|
|
+ "source": {
|
|
|
+ "mode": "synthetic"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
"mappings": {
|
|
|
- "_source": { "mode": "synthetic" },
|
|
|
"properties": {
|
|
|
"my_range": { "type": "long_range" }
|
|
|
}
|
|
@@ -316,8 +324,16 @@ For example:
|
|
|
----
|
|
|
PUT idx
|
|
|
{
|
|
|
+ "settings": {
|
|
|
+ "index": {
|
|
|
+ "mapping": {
|
|
|
+ "source": {
|
|
|
+ "mode": "synthetic"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
"mappings": {
|
|
|
- "_source": { "mode": "synthetic" },
|
|
|
"properties": {
|
|
|
"my_range": { "type": "ip_range" }
|
|
|
}
|
|
@@ -352,13 +368,21 @@ Will become:
|
|
|
// TEST[s/^/{"_source":/ s/\n$/}/]
|
|
|
|
|
|
[[range-synthetic-source-inclusive]]
|
|
|
-Range field vales are always represented as inclusive on both sides with bounds adjusted accordingly. Default values for range bounds are represented as `null`. This is true even if range bound was explicitly provided. For example:
|
|
|
+Range field values are always represented as inclusive on both sides with bounds adjusted accordingly. Default values for range bounds are represented as `null`. This is true even if range bound was explicitly provided. For example:
|
|
|
[source,console,id=synthetic-source-range-normalization-example]
|
|
|
----
|
|
|
PUT idx
|
|
|
{
|
|
|
+ "settings": {
|
|
|
+ "index": {
|
|
|
+ "mapping": {
|
|
|
+ "source": {
|
|
|
+ "mode": "synthetic"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
"mappings": {
|
|
|
- "_source": { "mode": "synthetic" },
|
|
|
"properties": {
|
|
|
"my_range": { "type": "long_range" }
|
|
|
}
|
|
@@ -394,8 +418,16 @@ Default values for range bounds are represented as `null` in synthetic source. T
|
|
|
----
|
|
|
PUT idx
|
|
|
{
|
|
|
+ "settings": {
|
|
|
+ "index": {
|
|
|
+ "mapping": {
|
|
|
+ "source": {
|
|
|
+ "mode": "synthetic"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
"mappings": {
|
|
|
- "_source": { "mode": "synthetic" },
|
|
|
"properties": {
|
|
|
"my_range": { "type": "integer_range" }
|
|
|
}
|
|
@@ -429,8 +461,16 @@ Will become:
|
|
|
----
|
|
|
PUT idx
|
|
|
{
|
|
|
+ "settings": {
|
|
|
+ "index": {
|
|
|
+ "mapping": {
|
|
|
+ "source": {
|
|
|
+ "mode": "synthetic"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
"mappings": {
|
|
|
- "_source": { "mode": "synthetic" },
|
|
|
"properties": {
|
|
|
"my_range": { "type": "date_range" }
|
|
|
}
|