Commit graph

687 commits

Author SHA1 Message Date
James Rodewig
ce4b95e5b0
[DOCS] Document time_series_metric mapping parameter (#78013)
Changes:
* Documents the `time_series_metric` mapping parameter for PR #76766.
* Renames the `dimension` parameter to `time_series_dimension` for PR #78012.
* Adds support for `unsigned_long` to `time_series_dimension` for PR #78204.
2021-09-23 08:54:19 -04:00
Adam Locke
7d61b0261c
[DOCS] Add composite runtime fields (#78050)
* [DOCS] Add composite runtime fields

* Update snippets and tests

* Add note that composite runtime fields cannot be indexed yet
2021-09-22 07:56:50 -04:00
James Rodewig
e729c3f543
[DOCS] Clarify geoshape orientation docs (#75888)
Adds additional information about how Elasticsearch uses polygon orientation. Elasticsearch only uses a polygon's orientation to determine if it crosses the international dateline. If so, Elasticsearch splits the polygon at the dateline.

Closes #74891
2021-09-08 11:10:03 -04:00
Adam Locke
32e364d394
[DOCS] Clarify indexing a runtime field (#77117)
* [DOCS] Clarify indexing a runtime field

* Clarify wording based on reviewer feedback
2021-09-01 11:59:11 -04:00
James Rodewig
1acc7e5d5e
[DOCS] Remove unneeded sidebar from array docs (#76664) 2021-08-18 14:00:30 -04:00
Julie Tibshirani
2ddbd62291
Mention match_only_text in disk usage docs (#76416)
* Mention match_only_text in disk usage docs

Previously we explained how to manually disable norms, freqs, and positions. We
now have a ready-made solution in the new `match_only_text` field type.

* Fixing typo and minor grammar changes

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-08-13 09:31:09 -04:00
James Rodewig
1fa6e79a1c
[DOCS] Clarify multi-field relationship to parent field (#76244)
Closes #71659
2021-08-09 11:43:06 -04:00
James Rodewig
32a516807a
[DOCS] Update routing formulas (#76203)
The `_routing` metadata field docs currently include formulas for how
Elasticsearch routes documents to shards. However, these formulas were not
updated for #18699.  This updates the routing formulas and adds xrefs for
related settings.

Closes #76072
2021-08-09 11:42:33 -04:00
Adam Locke
c9901429c2
[DOCS] Add retrieving runtime fields to introduction (#76084) 2021-08-04 11:17:28 -04:00
James Rodewig
fc0ac1923d
[DOCS] Correct spelling for geo terms (#76028)
Changes:
* Use "geopoint" when not referring to the literal field type
* Use "geoshape" when not referring to the literal field type or query type
* Use "GeoJSON" consistently
2021-08-03 09:55:48 -04:00
a-k-g
d671e3f7a8
[Docs] Include index param in geo_point docs (#75798) 2021-08-03 08:57:16 -04:00
James Rodewig
1eaf1beffd [DOCS] Reword internal use copy for dimension mapping parameter 2021-07-30 09:01:46 -04:00
Adrien Grand
feb6620d14
indices.query.bool.max_clause_count now limits all query clauses (#75297)
In the upcoming Lucene 9 release, `indices.query.bool.max_clause_count` is
going to apply to the entire query tree rather than per `bool` query. In order
to avoid breaks, the limit has been bumped from 1024 to 4096.

The semantics will effectively change when we upgrade to Lucene 9, this PR
is only about agreeing on a migration strategy and documenting this change.

To avoid further breaks, I am leaning towards keeping the current setting name
even though it contains `bool`. I believe that it still makes sense given that
`bool` queries are typically the main contributors to high numbers of clauses.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-07-21 12:16:30 +02:00
James Rodewig
1f04319826
[DOCS] Document time series dimension mapping parameters (#75414)
Changes:
* Documents the `dimension` mapping parameter for `ip`, `keyword`, and `numeric`
  fields.

* Documents the `index.mapping.dimension_fields.limit` index setting.
2021-07-19 11:24:30 -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
Adam Locke
b759c2fdd8
[DOCS] Word changes for runtime field incentives (#74769)
Incorporates feedback from #74454
2021-06-30 13:43:26 -04:00
Adam Locke
b890f9380c
[DOCS] Add performance info for runtime fields (#74454)
* [DOCS] Add performance info for runtime fields

* Add script-based sorting and clarify performance

* Changing title to Incentives and reworking the intro
2021-06-29 10:23:00 -04:00
James Rodewig
d4ed43c5a4
[DOCS] Remove deprecated geo_shape parameters (#74519)
* Removes docs and references for the following `geo_shape` mapping parameters:
  * `tree`
  * `tree_levels`
  * `strategy`
  * `distance_error_pct`
* Updates a related breaking change.

Relates to #70850
2021-06-29 08:52:05 -04:00
Benjamin Trent
07b336f1b0
Add support for range aggregations on histogram mapped fields (#74146)
This adds support for the range aggregation over `histogram` mapped fields.

Decisions made for implementation:

 - Sub-aggregations are not allowed. This is to simplify implementation and follows the prior art set by the `histogram` aggregation
 - Nothing fancy is done with the ranges. No filter translations as we cannot easily do a `range` filter query against histogram fields. This may be an optimization in the future.
 - Ranges check the histogram value ONLY. No interpolation of values is done. If we have better statistics around the histogram this MAY be possible.
2021-06-29 07:24:54 -04:00
Christos Soulios
df941367df
Add dimension mapping parameter (#74450)
Added the dimension parameter to the following field types:

    keyword
    ip
    Numeric field types (integer, long, byte, short)

The dimension parameter is of type boolean (default: false) and is used 
to mark that a field is a time series dimension field.

Relates to #74014
2021-06-24 20:16:27 +03:00
Luca Cavanna
5bfdcd2ec7
[DOCS] add missing dynamic runtime option (#74294) 2021-06-21 09:13:21 -04:00
Luca Cavanna
1d88fe639b
Dynamic runtime to not dynamically create objects (#74234)
When we introduced dynamic:runtime (#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts.

With this commit we adapt dynamic:runtime to not dynamically create objects.

Closes #70268
2021-06-18 14:12:43 +02:00
James Rodewig
8a899419bc [DOCS] Change multi field to multi-field 2021-06-15 11:40:03 -04:00
Daisuke Harada
fa61bf814e
Update runtime.asciidoc (#73802)
it looks typo in a few numbers there.
2021-06-07 09:36:05 -04:00
Adam Locke
e2c470abed
[DOCS] Retrieve values from flattened fields w/ runtime fields (#73630)
* [DOCS] Add retriving from flattened fields

* Clarify sub-field syntax

* Moving sub-field retrieval to flattened field docs

* Remove full example and de-emphasize runtime fields

* Remove extraneous sample tag
2021-06-03 11:52:53 -04:00
Adam Locke
0aa0171ce1
[DOCS] Create a new page for grok content in scripting docs (#73118)
* [DOCS] Moving grok to its own scripting page

* Adding examples

* Updating cross link for grok page

* Adds same runtime field in a search request for #73262

* Clarify titles and shift navigation

* Incorporating review feedback

* Updating cross-link to Painless
2021-05-27 15:18:34 -04:00
Adam Locke
89ed0c8e29
[DOCS] Expand information on using a runtime field without a script (#73219)
* [DOCS] Expand information on when to use a runtime field without a script

* Reworking information based on review feedback

* Clarify case where doc_values are disabled

* A few minor changes from review feedback
2021-05-25 15:09:31 -04:00
James Rodewig
8ec893a425
[DOCS] Change field alias anchor (#73043) 2021-05-13 09:32:36 -04: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
Dominic Page
dc43d05816
docs amendment match-only-text has limited support for aggs (#72985) 2021-05-12 16:48:57 +02: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
bbfa090a19
[DOCS] Fix bulk API xref (#72685) 2021-05-04 11:07:19 -04:00
Ignacio Vera
4fff3788f3
Disallow creating geo_shape mappings with deprecated parameters (#70850)
With the introduction of BKD-based geo shape indexing in #32039, the prefix tree indexing method has 
been deprecated. From 8.0.0, it will not be allowed to create new mappings using deprecated parameters.
2021-04-30 11:08:58 +02:00
Adrien Grand
83113ec8d3
Add match_only_text, a space-efficient variant of text. (#66172)
This adds a new `match_only_text` field, which indexes the same data as a `text`
field that has `index_options: docs` and `norms: false` and uses the `_source`
for positional queries like `match_phrase`. Unlike `text`, this field doesn't
support scoring.
2021-04-22 08:41:47 +02:00
Mayya Sharipova
f8215e752c
Add doc on rank_feature(s) negative score impact (#71795)
Add a warning about consequences of negative score impact
for documents that don't have values for rank_feature(s)
fields.

Related to #69994
2021-04-20 06:56:05 -04:00
Alan Woodward
ee3510b766
Add index-time scripts to geo_point field mapper (#71861)
This commit adds the ability to define an index-time geo_point field
with a script parameter, allowing you to calculate points from other
values within the indexed document.
2021-04-20 10:24:25 +01:00
Luca Cavanna
d8057bfe71
Rename on_script_error options to fail or continue (#71841)
As we started thinking about applying on_script_error to runtime fields, to handle script errors at search time, we would like to use the same parameter that was recently introduced for indexed fields. We decided that continue or fail gives a better indication of the behaviour compared to the current ignore or reject which is too specific to indexing documents.

This commit applies such rename.
2021-04-20 09:59:42 +02:00
Mayya Sharipova
853e68dfdf
Add access to dense_vector values (#71313)
Allow direct access to a dense_vector' values in script
through the following functions:

- getVectorValue – returns a vector's value as an array of floats
- getMagnitude – returns a vector's magnitude

Closes #51964
2021-04-19 08:02:05 -04:00
Christoph Büscher
948d02e4d6
Support fetching flattened subfields (#70916)
Currently the `fields` API fetches the root flattened field and returns it in a
structured way in the response. In addition this change makes it possible to
directly query subfields. However, requesting flattened subfields via wildcard
patterns is not possible.

Closes #70605
2021-04-15 12:28:58 +02:00
Alan Woodward
05551dd77b
Add index-time scripts to date field mapper (#71633)
This commit allows you to set 'script' and 'on_script_error' parameters
on date field mappers, meaning that runtime date fields can be made indexed
simply by moving their definitions from the runtime section of the mappings
to the properties section.
2021-04-14 09:18:05 +01:00
Nik Everett
6607a48435
Advise against dates with decimal points (#71578)
We accept dates with a decimal point like `2113413.13241324` and parse
them *somehow*. But there are cases where we'll lose precision on those
dates, see #70085. This advises folks not to use that format. We'll
continue to accept those dates for backwards compatibility but you
should avoid using them.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2021-04-13 15:11:05 -04:00
Nik Everett
b2caf4d230
Convert parent-join example script to runtime field (#71423)
Runtime fields are much more flexible than script_fields because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `parent_join` field in a script to a
runtime field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do something.

Relates to #69291
2021-04-13 09:00:18 -04:00
Alan Woodward
67db2538f8
Add index-time scripts to IP field mapper (#71617)
This commit allows you to set 'script' and 'on_script_error' parameters
on IP field mappers, meaning that runtime IP fields can be made indexed
simply by moving their definitions from the runtime section of the mappings
to the properties section.
2021-04-13 13:40:10 +01:00
Nik Everett
e4451bda05
Convert date_nanos example script to runtime field (#71351)
Runtime fields are much more flexible than script_fields because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `date_nanos` field in a script to a
runtime field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do something.

Relates to #69291

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-12 17:22:02 -04:00
Alan Woodward
5e11709693
Add scripts to keyword field mapper (#71555)
This commit adds script and on_script_error parameters to
keyword field mappers, allowing you to define index-time scripts
for keyword fields.
2021-04-12 16:46:02 +01:00
Luca Cavanna
1469e18c98
Add support for script parameter to boolean field mapper (#71454)
Relates to #68984
2021-04-12 10:04:12 +02:00
Julie Tibshirani
3da738e5db
Support fetching _tier field value (#71379)
Now that the `fields` option allows fetching metadata fields, we can support
loading the new `_tier` metadata field.

Relates to #63569 and #68135.
2021-04-08 11:41:52 -07:00
Nhat Nguyen
5c9969250d
Allow specify dynamic templates in bulk request (#69948)
This change allows users to specify dynamic templates in a bulk request.

```
PUT myindex
{
  "mappings": {
    "dynamic_templates": [{
      "time_histograms": {
        "mapping": {
          "type": "histogram",
          "meta": {
            "unit": "s"
          }
        }
      }
    }]
  }
}
```

```
POST myindex/_bulk
{ "index": { "dynamic_templates": { "response_times": "time_histograms" } } }
{ "@timestamp": "2020-08-12", "response_times": { "values": [1, 10], "counts": [5, 1] }}
```

Closes #61939
2021-04-08 12:44:36 -04:00
Adam Locke
343c52c19f
[DOCS] Adding page for indexing runtime fields (#71366)
* [DOCS] Adding page for indexing runtime fields

* Fixing tests.

* Incorporating review feedback to enhance and improve examples.

* Changing note to indicate immutable script when indexing, plus adding on_script_error.
2021-04-07 13:07:39 -04:00
Nik Everett
e158bc10b1
Convert boolean field example to runtime fields (#71341)
Runtime fields are much more flexible than `script_fields` because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `boolean` field in a script to a runtime
field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do *something*.

Relates to #69291
2021-04-06 14:42:44 -04:00