Kostas Krikellas
79580869a8
Add documentation for passthrough field type ( #114720 ) ( #114809 )
...
* Guard second doc parsing pass with index setting
* add test
* updates
* updates
* merge
* Add documentation for passthrough field type
* Apply suggestions from code review
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
* updates
* updates
* Update docs/reference/mapping/types/passthrough.asciidoc
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
* address comment
* address comment
* Update docs/reference/mapping/types/passthrough.asciidoc
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
* address comment
---------
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
(cherry picked from commit 4d775cba4f
)
2024-10-15 22:25:49 +11:00
Kostas Krikellas
7b3d726eca
Revert "Apply auto-flattening to subobjects: auto
( #112092 )" ( #113692 ) ( #113760 )
...
* Revert "Apply auto-flattening to `subobjects: auto` (#112092 )"
This reverts commit fffe8844
* fix DataGenerationHelper
(cherry picked from commit c9f378da29
)
# Conflicts:
# server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java
2024-09-30 18:19:26 +10:00
Kostas Krikellas
8539876663
[8.x] Apply auto-flattening to subobjects: auto
( #113584 )
...
* Apply auto-flattening to `subobjects: auto` (#112092 )
* Introduce mode `subobjects=auto` for objects
* Update docs/changelog/110524.yaml
* compilation error
* tests and fixes
* refactor
* spotless
* more tests
* fix nested objects
* fix test
* update fetch test
* add QA coverage
* update tests
* update tests
* update tests
* Apply auto-flattening to `subobjects: auto`
* Update docs/changelog/112092.yaml
* sync
* dont flatten subobjects auto
* refine test
* fix path for nested flattened objects and dynamic
* document `subobjects: auto`
* Apply suggestions from code review
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
* comment updates
* restore indentation in comment
* update comment
* update comment
* update comment
* update comment
* rename isFlattenable
* add test for dynamic template
* fix copy_to and noop dynamic updates
* tests
* update comment
* fix tests
* update cluster feature in yaml test
* address comments
---------
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
(cherry picked from commit fffe8844e9
)
# Conflicts:
# modules/dot-prefix-validation/build.gradle
# rest-api-spec/build.gradle
* Update build.gradle
2024-09-26 20:17:11 +10:00
Felix Barnsteiner
dee0be589c
Flatten object mappings when subobjects is false ( #103542 )
2024-02-22 11:43:12 +01:00
Luca Cavanna
d45b19db18
Add support for dots in field names for metrics usecases ( #86166 )
...
This PR adds support for a new mapping parameter to the configuration of the object mapper (root as well as individual fields), that makes it possible to store metrics data where it's common to have fields with dots in their names in the following format:
```
{
"metrics.time" : 10,
"metrics.time.min" : 1,
"metrics.time.max" : 500
}
```
Instead of expanding dotted paths the their corresponding object structure, objects can be configured to preserve dots in field names, in which case they can only hold leaf sub-fields and no further objects.
The mapping parameter is called subobjects and controls whether an object can hold other objects (defaults to true) or not. The following example shows how it can be configured in the mappings:
```
{
"mappings" : {
"properties" : {
"metrics" : {
"type" : "object",
"subobjects" : false
}
}
}
}
```
Closes #63530
2022-05-17 16:34:39 +02:00