Commit graph

624 commits

Author SHA1 Message Date
James Rodewig
62d6ac3ba5
[DOCs] Add tip for index_options parameter (#70450) (#70499)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: yudidi <972656027@qq.com>
2021-03-17 10:43:50 -04:00
jimczi
6ad67113f0 Revert "Change default format for date_nanos field (#70463)"
This reverts commit 3bf973ae0e.
2021-03-17 12:54:43 +01:00
Jim Ferenczi
3bf973ae0e Change default format for date_nanos field (#70463)
This commit updates the default format of date_nanos field
on existing and new indices to use `strict_date_optional_time_nanos` instead of
`strict_date_optional_time`.
Using `strict_date_optional_time` as the default format for date_nanos doesn't
make sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.

Relates #69192
Closes #67063
2021-03-17 12:14:24 +01:00
James Rodewig
302341a526
[DOCS] Replace put with create or update in API names (#70330) (#70421)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-15 17:16:13 -04:00
Julie Tibshirani
13946ea7e2
Move flattened field to core. (#70122)
This field mapper only lived in its own module so it could be licensed as x-pack
basic. Now it can be moved to core, which matches its status as a core type.

The PR also removes flattened fields from xpack usage stats now that they live
in core. The usage stats were already removed in on master, but this PR was not
backported to avoid a breaking change on 7.x. We have now clarified that usage
stats updates are not considered breaking, so it is safe to backport this
change.
2021-03-11 11:23:28 -08:00
Mayya Sharipova
f7cb422b86
Add positive_score_impact to rank_features type (#70277)
rank_features field type misses positive_score_impact parameter
that rank_feature type has. This adds this parameter.

Backport for #69994
Closes #68619
2021-03-11 06:50:36 -05:00
James Rodewig
5ae19ee8c6
[DOCS] Add guidance for mapping unstructured content (#69079) (#70098) 2021-03-08 13:14:42 -05:00
Mayya Sharipova
32c8bc4538 Remove size of dense_vector (#70024)
Remove not completely correct statement about the size of dense_vectors

We do store a dense_vector as binary doc value  with size `4*dims+4`.
But this is size before compression. As compressed size depends on
data itself, it is better to remove completely any statement
about the size.
2021-03-08 09:30:48 -05:00
Christoph Büscher
050cc41009 [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:32:36 +01:00
Nik Everett
bd4e059746 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:33:24 -05:00
Adam Locke
55ada03040
[DOCS] [7.x] Remove beta admonition for runtime fields. (#69562) 2021-02-24 11:55:15 -05:00
Adam Locke
85d279440d
[DOCS] [7.x] Adding grok support for runtime fields. (#69308) (#69473)
* [DOCS] [7.x] Adding grok support for runtime fields. (#69308)

* [DOCS] Adding grok support for runtime fields.

* Update response.

* Adding testresponse replacements.

* Update runtime field context and add dissect.

* Fixing backslash in the response.

* Fixing testresponse.

* Incorporating review feedback.

* Updates emit and adds cross link from ES runtime fields page.

* Add missing _type to response.
2021-02-23 14:25:03 -05:00
James Rodewig
45d93d9458
[DOCS] Remove added admons (#69452) (#69454) 2021-02-23 10:48:36 -05:00
James Rodewig
08b2136d78
[DOCS] Use consistent @timestamp field name (#69435) (#69449)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Koji Kawamura <ijokarumawak@users.noreply.github.com>
2021-02-23 10:20:23 -05:00
James Rodewig
8e991932b8
[DOCS] Improve docs for geo_shape field type's circle type (#69285) (#69361) 2021-02-22 10:36:41 -05:00
Adam Locke
7a2b326147
[DOCS] Relocate scriptless runtime document (#68916) (#69144)
* Reallocate runtime document

Reallocate document `runtime-fields-scriptless` from `runtime-search-request` to `runtime-mapping-fields`

* Move runtime without script section

Move runtime without script section to under the dynamic runtime mapping section

* Fix snippet formatting and remove discrete heading.

* Update test snippet.

Co-authored-by: Adam Locke <adam.locke@elastic.co>

Co-authored-by: S. J. Lee <occidere@naver.com>
2021-02-17 13:16:48 -05:00
James Rodewig
b55249507e
[DOCS] Fix typos for duplicate words (#69125) (#69132) 2021-02-17 11:16:58 -05:00
Luca Cavanna
4c19f6096f
Add the ability to remove a runtime field (backport of #68992) (#69080)
Currently, existing runtime fields can be updated, but they cannot be removed. That allows to correct potential mistakes, but once a runtime field is added to the index mappings, it is not possible to remove it.

With this commit we introduce the ability to remove an existing runtime field by providing a null value for it through the put mapping API. If a field with such name does not exist, such specific instruction will have no effect on other existing runtime fields.

Note that the removal of runtime fields makes the recently introduced assertRefreshItNotNeeded assertion trip, because when each local node merges mappings back in, the runtime fields that were previously removed by the master node, get added back again locally. This is only a problem for the assertion that verifies that the removed refresh operation is never needed. We worked around this by tweaking the assertion to ignore runtime fields completely, for simplicity, by assertion on the serialized merged mappings and incoming mappings without the corresponding runtime section.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-16 17:30:31 -05:00
James Rodewig
bb86f8ed7b
[DOCS] Document what makes a geo-point malformed (#59045) (#68557)
Co-authored-by: Ben Moskovitz <ben@mosk.nz>
2021-02-04 17:02:37 -05:00
Adam Locke
3185363400
[DOCS] Add beta admonition for runtime fields. (#67847) (#67849)
* Add beta admonition for runtime fields.

* Add beta admonition to search your data page.
2021-01-21 18:03:45 -05:00
Adam Locke
be307cfad1
[DOCS] [7.x] Add runtime fields to Painless Guide (#67781) (#67844)
* Adding runtime fields page for Painless context.

* Adds beta admonition to runtime fields and Painless docs.

* Fixing test errors and improving content sections.

* Adding refresh to fix test cases.

* Simplifying the ingest request to include refresh.

* Removing beta (will add in another PR) and updating examples.
2021-01-21 16:26:07 -05:00
Adam Locke
95e3810d15
[DOCS] [7.x] Updates to the runtime fields docs for 7.11+ (#67484) (#67711)
* [DOCS] [7.x] Updates to the runtime fields docs for 7.11+ (#67484)

* Moving examples to the page for retrieving runtime fields.

* Adding runtime_mappings to request body of search API.

* Updating runtime_mappings properties and adding runtime fields to search your data.

* Updating examples and hopefully fixing build failure.

* Fixing snippet formatting that was causing test failure.

* Adding page in Painless guide for runtime fields.

* Fixing typo.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Fixing testresponse to include _type.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-01-19 12:50:19 -05:00
James Rodewig
24f8a798f8
[DOCS] Add doc values restriction for wildcard fields (#67503) (#67513)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: AndyHunt66 <andrew.hunt@elastic.co>
2021-01-14 09:39:43 -05:00
Adam Locke
33caf15832
[DOCS] [7.x] Updating dynamic mappings for runtime fields (#67301) (#67368)
* [DOCS] [7.x] Updating dynamic mappings for runtime fields (#67301)

* Updating dynamic mappings for runtime fields.

* Updating example to fix test case and be more accurate.

* Changing header level for dynamic runtime.

* Clarifying language around ip fields in dynamic template.

* Adding test warning to fix snippet test.
2021-01-12 12:59:55 -05:00
James Rodewig
3872f08b33
[DOCS] Clean up index template xrefs (#67264) (#67272) 2021-01-11 12:58:00 -05:00
Adam Locke
2cc6da9f5a
[DOCS] [7.x] Runtime fields improvements (#66530) (#67271)
* 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.

* Minor revisions.
2021-01-11 12:55:05 -05:00
James Rodewig
b1b79adff6
[DOCS] Fix formatting for fieldata docs (#67017) (#67023) 2021-01-05 12:36:07 -05:00
James Rodewig
ba1b6e3bc9 [DOCS] Fix formatting 2020-12-16 20:47:29 -05:00
Christos Soulios
f4c92aef79
[7.x] [DOCS] Added docs for aggregate_metric_double field (#66306) (#66388)
Added documentation for the aggregate_metric_double field that was merged in #56745

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-12-15 21:24:57 +02:00
Adam Locke
18ebcbb8a9
Incorporating changes from review. (#66346) 2020-12-15 10:06:17 -05:00
Gilad Gal
82cd8b5d16
Update runtime.asciidoc 2020-12-15 10:24:36 +02:00
Adam Locke
9830222aaf
[DOCS] Add dynamic runtime fields to docs (#66194) (#66304)
* [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:56:11 -05:00
Adam Locke
68539f95a5
[DOCS] [7.x] Add docs for runtime fields (#62653) (#66140)
* [DOCS] Add docs for runtime fields (#62653)

* First steps in docs for runtime fields.

* Adding new page for runtime fields.

* Adding page for runtime fields.

* Adding more to the runtime fields topic.

* Adding parameters and retrieval options for runtime fields.

* Adding TESTSETUP for index creation.

* Incorporating review feedback.

* Incorporating reviewer feedback.

* Adding examples for runtime fields.

* Adding more context and simplifying the example.

* Changing timestamp to @timestamp throughout.

* Removing duplicate @timestamp field.

* Expanding example to hopefully fix CI builds.

* Adding skip test for result.

* Adding missing callout.

* Adding TESTRESPONSEs, which are currently broken.

* Fixing TESTRESPONSEs.

* Incorporating review feedback.

* Several clarifications, better test cases, and other changes.

* Adding missing callout in example.

* Adding substitutions to TESTRESPONSE for shorter results shown.

* Shuffling some information and adding link to script-fields.

* Fixing typo.

* Updates for API redesign -- will break builds.

* Updating examples and including info about overriding fields.

* Updating examples.

* Adding info for using runtime fields in the search request.

* Adding that queries against runtime fields are expensive.

* Incorporating feedback from reviewers.

* Minor changes from reviews.

* Adding alias for test case.

* Adding aliases to PUT example.

* Fixing test cases, for real this time.

* Updating use cases and introducing overlay throughout.

* Edits, adding 'shadowing', and explaining shadowing better.

* Streamlining tests and other changes.

* Fix formatting in example for test.

* Apply suggestions from code review

* Incorporating reviewer feedback 7 Dec

* Shifting structure of mapping page to fix cross links.

* Revisions for shadowing, overview, and other sections.

* Removing dot notation section and incorporating review changes.

* Adding updated example for shadowing.

* Streamlining shadowing example and TESTRESPONSEs.

* Adding type field in responses for 7.x to fix test cases.
2020-12-09 19:32:15 -05:00
James Rodewig
9e00530942
[DOCS] Fix _doc_count field title (#65704) (#65738) 2020-12-02 08:27:38 -05:00
James Rodewig
ead04bfd0b
[DOCS] Fix _doc_count example typo (#65686) (#65702)
Co-authored-by: Gil Raphaelli <gil@elastic.co>
2020-12-01 14:56:59 -05:00
Julie Tibshirani
c7738e0a19 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 09:08:13 -08:00
Wylie Conlon
4d9f5b1867 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:56:02 -08:00
Martijn van Groningen
ce91f27df8
Improve error message in case of invalid dynamic templates. (#65001)
Backporting #60870 to 7.x branch.

Include the attempted 'match_mapping_type' into the message,
so that it is clearer that multiple validation attempts have occurred.

Dynamic template validation was recently added via #51233 and
there was some confusion over the deprecation message itself.
(in 7.x only deprecation warning will be omitted and from 8.0
 an error will be returned)
2020-11-12 16:58:18 +01:00
James Rodewig
66e449bf17
[DOCS] Clarify args for geoshape orientation (#64649) (#64697) 2020-11-06 07:57:11 -05:00
Christos Soulios
e1d7b4ff54
[7.x] Add doc_count field mapper (#64594)
Bucket aggregations compute bucket doc_count values by incrementing the doc_count by 1 for every document collected in the bucket.

When using summary fields (such as aggregate_metric_double) one field may represent more than one document. To provide this functionality we have implemented a new field mapper (named doc_count field mapper). This field is a positive integer representing the number of documents aggregated in a single summary field.

Bucket aggregations will check if a field of type doc_count exists in a document and will take this value into consideration when computing doc counts.
2020-11-06 11:54:29 +02:00
Alex Chan
fc268a4d47 [Docs] Note that wildcard field supports null_value 2020-11-05 19:06:59 +01:00
Mayya Sharipova
21c1b40dca
Disable using unsigned_long in scripts (#64552)
Backport for #64523
Relates to #64361
2020-11-03 15:16:22 -05:00
James Rodewig
aea83909d9
[DOCS] Fix case for 'Boolean' (#64299) (#64341) 2020-10-29 10:04:20 -04:00
James Rodewig
0a48276357
[DOCS] Re-add sparse vector xref (#64307) 2020-10-29 08:55:26 -04:00
James Rodewig
f1b632afdb
[DOCS] Sort field data types in docs (#64288) (#64304)
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
2020-10-28 13:53:39 -04:00
Adrien Grand
1066280be5
Document standard metadata entries. (#61941) (#63538)
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-13 14:46:34 +02:00
Alan Woodward
88b45dfa61
Convert TextFieldMapper to parametrized form (#63269) (#63392)
As a result of this, we can remove a chunk of code from TypeParsers as well. Tests
for search/index mode analyzers have moved into their own file. This commit also
rationalises the serialization checks for parameters into a single SerializerCheck
interface that takes the values includeDefaults, isConfigured and the value
itself.

Relates to #62988
2020-10-07 13:26:25 +01:00
Mayya Sharipova
bea0ead08a
Fix fields retrieval on unsinged_long field (#63310)
This fixes fields retrieval on unsigned_long field

1) For docvalue_fields a custom UnsignedLongLeafFieldData::getLeafValueFetcher
is implemented that correctly retrieves doc values.

2) For stored fields, an error was fixed in UnsignedLongFieldMapper
 how stored values were stored. Before they were incorrectly
stored in the shifted format, now they are stored as original
values in String format.

Relates to #60050
Backport for #63119
2020-10-06 06:37:31 -04:00
Mayya Sharipova
54064a1eec
Unsigned long 64bits(#62892)
Introduce 64-bit unsigned long field type

This field type supports
- indexing of integer values from [0, 18446744073709551615]
- precise queries (term, range)
- precise sort and terms aggregations
- other aggregations are based on conversion of long values
  to double and can be imprecise for large values.

Backport for #60050
Closes #32434
2020-09-24 16:51:47 -04:00
James Rodewig
76da348f7a
[DOCS] Change index name from index to my-index-000001 (#62678) (#62704)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Subhendu Sethi <cs13b1027@iith.ac.in>
2020-09-21 10:11:15 -04:00