Commit graph

170 commits

Author SHA1 Message Date
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
Salvatore Campagna
bac208a154
Introduce an ignore_above index-level setting (#113121) (#113414)
Here we introduce a new index-level setting, `ignore_above`, similar to what we have
for `ignore_malformed`. The setting will apply to all `keyword`, `wildcard` and `flattened`
fields. Each field mapping will still be allowed to override the index-level setting using a
mapping-level `ignore_above` value.

(cherry picked from commit 208a1fe571)
2024-09-24 06:16:08 +10:00
Liam Thompson
4034615e29
[DOCS] Clarify copy_to behavior with strict dynamic mappings (#111408)
* [DOCS] Clarify copy_to behavior with strict dynamic mappings

* Add id

* De-verbosify

* Delete pesky comma

* More info about root and nest

* Fixes per review, clarify non-recursive explanation

* Skip tests for illustrative example

* Fix example syntax

* Fix typo
2024-08-01 14:37:17 +02:00
Benjamin Trent
61b3d98227
Add note about optional times and epochs (#105786) 2024-03-05 08:44:03 -05:00
Felix Barnsteiner
dee0be589c
Flatten object mappings when subobjects is false (#103542) 2024-02-22 11:43:12 +01:00
Felix Barnsteiner
f642b8a3aa
Add setting to ignore dynamic fields when field limit is reached (#96235)
Adds a new `index.mapping.total_fields.ignore_dynamic_beyond_limit`
index setting.

When set to `true`, new fields are added to the mapping as long as the
field limit (`index.mapping.total_fields.limit`) is not exceeded. Fields
that would exceed the limit are not added to the mapping, similar to
`dynamic: false`.  Ignored fields are added to the `_ignored` metadata
field.

Relates to https://github.com/elastic/elasticsearch/issues/89911

To make this easier to review, this is split into the following PRs: -
[x] https://github.com/elastic/elasticsearch/pull/102915 - [x]
https://github.com/elastic/elasticsearch/pull/102936 - [x]
https://github.com/elastic/elasticsearch/pull/104769

Related but not a prerequisite: - [ ]
https://github.com/elastic/elasticsearch/pull/102885
2024-02-02 05:53:52 -05:00
debadair
777598d602
[DOCS] Remove redirect pages (#88738)
* [DOCS] Remove manual redirects

* [DOCS] Removed refs to modules-discovery-hosts-providers

* [DOCS] Fixed broken internal refs

* Fixing bad cross links in ES book, and adding redirects.asciidoc[] back into docs/reference/index.asciidoc.

* Update docs/reference/search/point-in-time-api.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

* Update docs/reference/setup/restart-cluster.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

* Update docs/reference/sql/endpoints/translate.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

* Update docs/reference/snapshot-restore/restore-snapshot.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

* Update repository-azure.asciidoc

* Update node-tool.asciidoc

* Update repository-azure.asciidoc

---------

Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Amy Jonsson <amy.jonsson@elastic.co>
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-05-24 12:32:46 +01:00
Martijn van Groningen
1f40ced134
Tiny tsdb docs update (#95333)
Update definition of metric type counter to include it resets to zero.

Just like is defined on the tsdb page:
https://www.elastic.co/guide/en/elasticsearch/reference/current/tsds.html#time-series-metric
2023-04-18 11:17:31 -04:00
Hritik Kumar
f5af004117
Support ignore_malformed in boolean fields (#93239)
This PR enables the `ignore_malformed`parameter to be accepted as an option in 
boolean field mappings. Support for synthetic source is not added yet, so if
`ignore_malformed` is set to true, synthetic source isn't supported.

Closes #89542
2023-02-21 18:22:10 +01:00
David Turner
ce736dd0e0 Revert "enhancement: boolean field to support ignore_malformed (#90122)"
This was merged in error without a full CI run, and has some issues.

This reverts commit edcdc43519.
This reverts commit 26c0a35558.
2023-01-25 15:09:59 +00:00
Hritik Kumar
edcdc43519
enhancement: boolean field to support ignore_malformed (#90122)
* enhancement: boolean field to support ignore_malformed

* fix: changes in current builder for BooleanFieldMappers within tests files.

* Updating documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Amy Jonsson <amy.jonsson@elastic.co>
2023-01-25 13:56:50 +00:00
Nicolas Ruflin
71739416cf
[Docs] Add more details to the index option docs (#92606)
Docs around the `index` option were not very precise. The term "typical" was used without describing for which fields querying is still available when `index: false` is set. But more precise docs existed in the `doc_values` documentation found here for the index option: https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html This docs were mostly copied over.

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-01-04 09:09:21 +01:00
Anthony McGlone
47e3b89176
[DOCS] Clarify multi-field addition requires update by query for existing documents (#91541)
* [DOCS] Clarify multi-field addition requires update by query for existing documents

* Update docs/reference/mapping/params/multi-fields.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

* Update docs/reference/indices/put-mapping.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-11-18 12:38:04 +01:00
Etki
cec0ab20ff
Added reference to terms_set query in regular terms query documentation (#91204)
* Added reference to terms_set query in regular terms query documentation

* Update docs/reference/query-dsl/terms-query.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-11-09 16:00:52 +01:00
Mark Laney
fe2ec6c916 Remove any mention of "mapping type" (#86242)
Mapping types were removed in v6.0 so they shouldn't be mentioned in the
description of inheritance of the `dynamic` setting.
2022-09-27 16:47:11 +02:00
Alan Woodward
d507a4982c
Add line to meta param docs explaining limits on use (#90300) 2022-09-23 16:19:28 +01:00
Abdon Pijpelink
e891909dfa
[DOCS] Explain dynamic behavior for unmapped copy_to fields (#89626)
* [DOCS] Explain dynamic behavior for unmapped copy_to fields

* Review suggestions
2022-08-30 15:15:35 +02:00
Jingguo Yao
2309eb2c2d
Fix a typo in date format docs (#87018)
The example dates have the day parts of the month instead of the day parts of the week.
2022-07-05 12:15:13 +02: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
Yannick Welsch
083bb8a3fd
Add extra section on doc-value-only fields to documentation (#84209)
Adds a dedicated section for doc-value-only fields to the docs that can be linked to.
2022-02-22 11:46:10 +01:00
Yannick Welsch
7f0595abe6
Implement all queries on doc-values only keyword fields (#83404)
Adds doc-values-only search support for wilcard/regexp/prefix/fuzzy etc. queries on keyword fields.

Relates #81210 and #52728
2022-02-02 14:06:27 +01:00
Yannick Welsch
eec26826d6
Allow doc-values only search on geo_point fields (#83395)
Similar to #82409, but for geo_point fields.

Allows searching on geo_point fields when those fields are not indexed (index: false) but just doc values are enabled.

Also adds distance feature query support for date fields (bringing date field to feature parity with runtime fields)

This enables searches on archive data, which has access to doc values but not index structures. When combined with
searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set
of documents.

Relates #81210 and #52728
2022-02-02 11:56:19 +01:00
Mitar
b65fb17a48 Fixed documentation for built in date formats. (#83036)
We had a lot of `ZZ` on the end of formats. But it's just `Z`.
2022-01-26 14:22:02 -05:00
Yannick Welsch
d9f77fa3a6
Allow doc-values only search on ip fields (#82929)
Allows searching on ip fields when those fields are not indexed (index: false) but just doc values are enabled.

This enables searches on archive data, which has access to doc values but not index structures. When combined with
searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set
of documents.

Relates #81210 and #52728
2022-01-25 09:24:12 +01:00
Yannick Welsch
0592c4cd7e
Allow doc-values only search on boolean fields (#82925)
Allows searching on boolean fields when those fields are not indexed (index: false) but just doc values are enabled.

This enables searches on archive data, which has access to doc values but not index structures. When combined with
searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set
of documents.

Relates #81210 and #52728
2022-01-24 14:27:06 +01:00
Yannick Welsch
fd7f69cea6
Allow doc-values only search on keyword fields (#82846)
Allows searching on keyword fields when those fields are not indexed (index: false) but just doc values are enabled.

This enables searches on archive data, which has access to doc values but not index structures. When combined with
searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set
of documents.

Relates #81210 and #52728
2022-01-24 08:57:11 +01:00
Yannick Welsch
928c09a373
Allow doc-values only search on date types (#82602)
Similar to #82409, but for date fields.

Allows searching on date field types (date, date_nanos) when those fields are not indexed (index: false) but just doc
values are enabled.

This enables searches on archive data, which has access to doc values but not index structures. When combined with
searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set
of documents.

Relates #81210 and #52728
2022-01-17 11:57:31 +01:00
Yannick Welsch
e421477ac8
Allow docvalues-only search on number types (#82409)
Allows searching on number field types (long, short, int, float, double, byte, half_float) when those fields are not
indexed (index: false) but just doc values are enabled.

This enables searches on archive data, which has access to doc values but not index structures. When combined with
searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set
of documents.

Note to reviewers:

I have split isSearchable into two separate methods isIndexed and isSearchable on MappedFieldType. The former one is
about whether actual indexing data structures have been used (postings or points), and the latter one on whether you
can run queries on the given field (e.g. used by field caps). For number field types, queries are now allowed whenever
points are available or when doc values are available (i.e. searchability is expanded).

Relates #81210 and #52728
2022-01-13 16:23:01 +01:00
Yannick Welsch
6eef523674
Revert 74559 (Avoid global ordinals in composite) (#78846) (#80498)
This reverts the change to use segment ordinals in composite terms aggregations due to a performance degradation when the field is high cardinality.

Co-authored-by: Mark Tozzi <mark.tozzi@elastic.co>
2021-11-08 17:11:46 +01:00
Julie Tibshirani
075d08eb64
Update dense_vector docs with kNN indexing options (#80306)
This commit updates the `dense_vector` docs to include information on the new
`index`, `similarity`, and `index_options` parameters. It also tries to clarify
the difference between `similarity` and `index_options` with the existing
parameters that have the same name.

Relates to #78473.
2021-11-04 11:44:13 -07:00
Dan Hermann
4a36d5cd79
Remove endpoint for freezing indices (#78918) 2021-10-26 06:37:56 -05:00
James Rodewig
1fa6e79a1c
[DOCS] Clarify multi-field relationship to parent field (#76244)
Closes #71659
2021-08-09 11:43:06 -04:00
Yannick Welsch
412ac1a042
Update docs that composite agg no longer uses global ords (#74754)
Follow-up to #74559
2021-07-05 11:26:30 +02:00
James Rodewig
8dddca77aa
[DOCS] Remove and redirect frozen index overview content (#72990)
Changes:

* Removes and adds redirects for the frozen indices [overview][0], [best
  practices][1], [search][2], and [monitoring][3] pages.
* Removes glossary terms related to frozen indices.
* Updates several xrefs to point to the freeze index API docs.

Relates to elastic/elasticsearch#72946 and elastic/elasticsearch#70192.

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/7.12/frozen-indices.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/best_practices.html
[2]: https://www.elastic.co/guide/en/elasticsearch/reference/master/searching_a_frozen_index.html
[3]: https://www.elastic.co/guide/en/elasticsearch/reference/master/monitoring_frozen_indices.html
2021-05-12 12:54:20 -04:00
Christoph Büscher
f34c9a8a40
Enhance error message for copy-to (#72820)
We currently don't support `copy_to` for fields that take the form of objects
(e.g. `date_range` or certain kinds of `geo_point` variants). The current
problem with objects is that when DocumentParser parses anything other than
single values, it potentially advances the underlying parser past the value that
we would need to stay on for parsing the value again. While we might want to
support this in the future, for now this PR enhances the otherwise confusing
MapperParsingException with something more helpful and adds a short note in the
documentation about this restriction.

Closes #49344
2021-05-11 13:27:45 +02:00
James Rodewig
693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
James Rodewig
d8a78b9d26
[DOCs] Add tip for index_options parameter (#70450) (#70498)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: yudidi <972656027@qq.com>
2021-03-17 10:43:41 -04:00
James Rodewig
5c75d004fa
[DOCS] Replace put with create or update in API names (#70330)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-15 14:49:44 -04:00
Christoph Büscher
6011d99b14
[DOCS] Improve tip about updating search_analyzer (#69621)
The tip about updating a `search_analyzer` currently does not mention that most
of the time (when the current analyzer is not "default"), user need to repeat
the currently set "analyzer" parameter in the field definition. Adding this as a
short note.
2021-03-03 16:31:29 +01:00
Nik Everett
fe457f156d
Docs: Call out that you can't update analyzer (#69889)
You can't update the `analyzer` parameter in the PUT mappings API even if
the index is closed. This adds a TIP to call that out. And adds a TIP
for `search_quote_analyzer` which you *can* update.
2021-03-03 10:28:55 -05:00
James Rodewig
9b88ae92e6
[DOCS] Fix typos for duplicate words (#69125) 2021-02-17 10:34:20 -05:00
James Rodewig
e3640c15d6
[DOCS] Add doc values restriction for wildcard fields (#67503) (#67512)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: AndyHunt66 <andrew.hunt@elastic.co>
2021-01-14 09:39:31 -05:00
Adam Locke
8f2df51829
[DOCS] Runtime fields improvements (#66530)
* Changes for dynamic templates.

* Clarifying language around dynamic:true and dynamic:runtime.

* Clarifying edits and some restructuring.

* Overhauling the Mapping page.

* Incorporating changes from #66911.

* Reworking mapping page to focus on dynamic vs. explicit mapping.

* Reordering to fix test failure.

* Further clarifying mapping page.

* Reordering sections, adding headings to examples, and other clarifications.

* Incorporating review feedback.

* Adding description of  for Painless script.
2021-01-11 12:31:26 -05:00
Adam Locke
fe54c2ffd2
[DOCS] Add dynamic runtime fields to docs (#66194)
* [DOCS] Add dynamic runtime fields to docs.

* Clarifying edits and example changes.

* Creating better table and incorporating review comments.

* Change numeral to superscript.
2020-12-14 16:37:42 -05:00
Julie Tibshirani
abe5e1707e
Remove note on marking copy_to fields as stored. (#65459)
During highlighting, we now load all values that were copied into the field
through copy_to. So there's no longer a reason to set 'store: true' to account
for fields not available in _source.
2020-11-25 08:01:36 -08:00
Wylie Conlon
10ee0f2878
Clarify field data cache behavior in docs (#64375)
* Clarify that field data cache includes global ordinals
* Describe that the cache should be cleared once the limit is reached
* Clarify that the `_id` field does not supported aggregations anymore
* Fold the `fielddata` mapping parameter page into the `text field docs
* Improve cross-linking
2020-11-20 13:53:23 -08:00
Adrien Grand
62348b6a8a
Document standard metadata entries. (#61941)
We standardize on some metadata entries that we plan to later leverage
in Kibana in order to provide a better out-of-the-box experience, e.g.
different visualizations make sense on gauges and counters.
2020-10-12 09:49:39 +02:00
James Rodewig
a94e5cb7c4
[DOCS] Replace Wikipedia links with attribute (#61171) 2020-08-17 09:44:24 -04:00
James Rodewig
bb5a4b3f82
[DOCS] Cross-link copy_to and search speed docs (#60926) 2020-08-10 14:34:59 -04:00
James Rodewig
441c3a21b1
[DOCS] Update my-index examples (#60132)
Changes the following example index names to `my-index-000001` for consistency:

* `my-index`
* `my_index`
* `myindex`
2020-07-27 14:46:39 -04:00