Commit graph

1071 commits

Author SHA1 Message Date
James Rodewig
cfae69717a
[DOCS] Update anchor and add redirect for aliases (#77349)
PRs #73062 and #73043 repurposed the `alias` anchor for a new guide for index
and data stream aliases. Previously, this anchor was used for our field alias
documentation.

Repurposing the anchor has caused continuity errors for users selecting
different versions of the ES docs. It could also cause confusion for users with
a `/current/` link to the `alias` page.

This updates the anchor for the alias guide and adds a redirect page to
disambiguate the `alias` anchor.

It also fixes a bread crumb issue for redirects following the 'Modifying your
Data' redirect page.

Closes #77034.
2021-09-07 09:42:42 -04:00
Joe Gallo
a127154042
[DOCS] Fix the terms enum API docs for search_after (#76991) 2021-08-26 14:07:06 -04:00
James Rodewig
bb9587351e
[DOCS] Fix typos (#76875) 2021-08-24 08:47:12 -04:00
James Rodewig
31153e0002
[DOCS] Fix multi-value search preference docs (#76822)
You can't combine a `_shards` search `preference` argument with `<custom-string>`.
2021-08-23 08:33:12 -04:00
James Rodewig
7d70414c00
[DOCS] Update vector tile search API title (#76506) 2021-08-13 11:55:11 -04:00
James Rodewig
96c4ee3e5c
[DOCS] Document _mvt API (#75384)
* [DOCS] Document `_mvt` API

Documents the `_mvt` API endpoint added with #73872.

Relates to #75242.

* Reword

* Rename API

* Fix doc.url in JSON spec

* Reword

* Reword

* Add content type to JSON spec

* Edits

* Fix typo

* Reword

* Update docs after meeting

* Fix typos

* Fix `size` default

* Updates for #75522

* Fixes

* Clean up JSON spec

* Fix extent tag

* [DOCS] Add `<field>` constraints

* Minor clarification

* Update for #75697

* Reword

* Update for #75621

* Reword default sort

* Update for #75367

* Remove unneeded whitespace

* Add experimental admon and if flags

* [DOCS] Remove ifdefs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-08-05 15:04:07 -04:00
Elasticsearch addict
7e7b5c9367
[DOCS] Clarify copy for terms enum API's complete flag (#76066)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-08-05 08:28:16 -04:00
Julie Tibshirani
cdf67e0fd5
Support search slicing with point-in-time (#74457)
This PR adds support for using the `slice` option in point-in-time searches. By
default, the slice query splits documents based on their Lucene ID. This
strategy is more efficient than the one used for scrolls, which is based on the
`_id` field and must iterate through the whole terms dictionary. When slicing a
search, the same point-in-time ID must be used across slices to guarantee the
partitions don't overlap or miss documents.

Closes #65740.
2021-07-08 15:33:41 -07:00
James Rodewig
3971522c65
[DOCS] EQL: Document cross-cluster search support (#74995) (#75045)
Closes #74842.
2021-07-07 09:41:07 -04:00
Adam Locke
6974f5861a
[DOC] Update tests for collapse search results (#74721)
* [DOC] Update tests for collapse search results

* Add filter for inner hits

* Fixing tests

* Fix typos
2021-07-01 10:21:59 -04:00
James Rodewig
3d1cb4944d
[DOCS] Overhaul search template docs (#72583)
Changes:

* Adds a tutorial for search templates.
* Adds reference docs for the render search template API.
* Improves parameter documentation for the multi search template API.
* Removes duplicate examples from the search template API, multi search API, and create stored script API docs.
* Splits the source files for the search template API and the multi search template API docs.
2021-06-30 16:03:49 -04:00
debadair
29bb8fd67e
[DOCS] Add info about GET/POST to the API conventions. (#74529)
* [DOCS] Add info about GET/POST to the API conventions.

* Fixed anchor

* Added redirect

* Incorporated review suggestions
2021-06-30 09:24:42 -07:00
Mayya Sharipova
aa76ebbfbe
Set max allowed size for stored async response (#74455)
Add a dynamic transient cluster setting search.max_async_search_response_size
that controls the maximum allowed size for a stored async search
response. The default max size is 10Mb. An attempt to store
an async search response larger than this size will result in error.

Relates to #67594
2021-06-30 10:21:28 -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
Nik Everett
8904ffe2be
Add extra profiling information to terms agg (#73636)
I was helping some folks debug an issue with the terms agg and noticed
that we didn't always have the `total_buckets` debug information. I also
noticed that we can't tell how many buckets we build, so I added that
too as `built_buckets`.

Finally, I noticed that when we're using segment ords we count segments
without any values as "multi-valued". We can do better there and count
them as no-valued. That will, mostly, just improve the profiling. When
we collect from global ords we have no way to tell how many values are
on the segment so segments without any values will, sadly, in this case
still be miscounted as multi-valued.
2021-06-21 10:10:41 -04:00
James Rodewig
c04fd6e301 [DOCS] Remove 'closed data stream' reference 2021-05-27 16:07:09 -04:00
James Rodewig
5729bb8d49
[DOCS] Update alias references (#73427)
Updates several `index aliases` references to `aliases`.
2021-05-27 16:00:57 -04:00
James Rodewig
39a0314d30
[DOCS] Update alias xrefs (#73380)
Updates several internal 'alias' xrefs to point to the aliases guide rather than
API docs.
2021-05-25 16:19:00 -04:00
Julie Tibshirani
f85a9dddb9
Support field collapsing with search_after (#73023)
This change adds support for using `search_after` with field collapsing. When
using these in conjunction, the same field must be used for both sorting and
field collapsing. This helps keep the behavior simple and predictable.
Otherwise it would be possible for a group to appear on multiple pages of
results.

Currently search after is handled directly in `CollapsingTopDocsCollector`. As
a follow-up, we could generalize the logic and move support to the Lucene
grouping framework.

Closes #53115.
2021-05-19 14:21:18 -07:00
James Rodewig
eeb1098874
[DOCS] Use query parameters in search API example (#73158)
The current search API documentation doesn't include any examples of query
parameter usage.

This updates the docs to include a simple syntax example using the `from` and
`size` query parameters.
2021-05-17 12:18:50 -04:00
markharwood
dbc37f9f6e
TermsEnum api - allow null search strings (#73144)
Allow null search strings (matches all)

Closes #73141
2021-05-17 15:54:53 +01:00
Seth Michael Larson
ff406a88cc
Rename 'termsenum' API to 'terms_enum' for better readability 2021-05-17 08:08:06 -05:00
James Rodewig
34d5f6c246
[DOCS] Consolidate routing parameter definitions (#73107)
Combines duplicate definitions for the `routing` parameter.
2021-05-14 12:27:19 -04:00
markharwood
ebb113a7e3
Add "search_after" support to new termsEnum api (#72933)
Adds an optional parameter to the _terms_enum request designed to allow paging.
The last term from a previous result can be passed as the search_after parameter to a subsequent request, meaning only terms after the given term (but still matching the provided string prefix) are returned
Relates to #72910
2021-05-14 15:00:21 +01:00
James Rodewig
8ec893a425
[DOCS] Change field alias anchor (#73043) 2021-05-13 09:32:36 -04:00
James Rodewig
7909d3bd77
[DOCS] Fix JSON spec link for terms enum API (#72996) 2021-05-12 12:57:56 -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
markharwood
2dca93fbda
Links new TermsEnum api into docs. Remove superfluous “API” from page title. (#72992)
Closes #72982
2021-05-12 16:21:36 +01:00
markharwood
73e0662f09
New TermsEnum API for discovering terms in the index. (#66452)
New api designed for use by apps like Kibana for auto-complete use cases.
A search string is supplied which is used as prefix for matching terms found in a given field in the index.
Supported field types are keyword, constant_keyword and flattened.
A timeout can limit the amount of time spent looking for matches (default 1s) and an `index_filter` query can limit indices e.g. those in the hot or warm tier by querying the `_tier` field

Closes #59137
2021-05-06 10:45:37 +01:00
James Rodewig
0edb8f4708
[DOCS] Document missing script APIs (#72175)
Documents the following APIs:

* [Delete stored script][0]
* [Get stored script][1]
* [Get script contexts][2]
* [Get script languages][3]

[0]: https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json
[1]: https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json
[2]: https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/api/get_script_context.json
[3]: https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/api/get_script_languages.json
2021-05-04 11:03:30 -04:00
James Rodewig
84eebbbdd0 [DOCS] Decrement 'Search your data' headings 2021-04-28 11:37:57 -04:00
Wylie Conlon
15806b648b
[DOCS] Clarify timeout and terminate_after parameters (#71713)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-23 09:26:21 -04:00
James Rodewig
3f2eb32afc
[DOCS] Sync EQL docs with fields param updates (#72008) 2021-04-21 09:13:27 -04:00
Adam Locke
6dfd92c46f
[DOCS] Focus retrieving selected fields on fields parameter (#71506)
* [DOCS] Focus retrieving selected fields on fields parameter

* Incorporating changes from reviews

* Adding clarifications from review feedback

* Slight wording revisions.

* Clarify language around format parameter and move text out of callout.
2021-04-20 15:11:35 -04:00
James Rodewig
c5a2f9ed9c [DOCS] Remove beta admon for runtime fields 2021-04-19 09:35:44 -04:00
James Rodewig
f9c5f55c4b
[DOCS] Document create stored script API (#71493) 2021-04-19 09:19:12 -04:00
James Rodewig
07fade1d27
[DOCS] EQL/SQL: Document runtime_fields parameter (#71487) 2021-04-19 09:15:12 -04:00
Nik Everett
0623b03170
Fit runtime field on line (#71470)
This shrinks a runtime field definition so that it fits on the screen
without scrolling. It also converts the doc into a test so we can be
sure it continues to work.

Relates to #69291
2021-04-12 18:15:44 -04:00
James Rodewig
44922f6b3d [DOCS] Fix search template label 2021-04-08 13:14:10 -04:00
Nik Everett
6a1220e7f3
Convert metric aggs docs runtime fields (#71260)
This replaces the `script` docs for bucket aggregations with runtime
fields. We expect runtime fields to be nicer to work with because you
can also fetch them or filter on them. We expect them to be faster
because their don't need this sort of `instanceof` tree:
a92a647b9f/server/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java (L42)

Relates to #69291

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-05 13:08:13 -04:00
Julie Tibshirani
d02df3f3fe
Remove the beta flag from 'fields' option. (#71130)
Now that we've addressed the open issues, the 'fields' option can be considered GA.

Relates to #60985.
2021-03-31 10:00:42 -07:00
James Rodewig
693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
Jim Ferenczi
fa88a46b9c
Expose if a field is a metadata field in the field capabilities response (#69977)
This change exposes for each field in the _field_caps response if the field is a metadata field.
This is needed for consumers of this API that want to filter these fields. Currently ML keeps a static list
and QL checks that the family type starts with `_`. In order to ease the addition of new metadata fields, this
change reworks the strategy in this solution and now only checks for the new flag.
Note that the new flag is also applied at the coordinator level in a best-effort to apply the logic on older nodes
in a mixed-version cluster.
2021-03-30 12:13:03 +02:00
Adam Locke
184cb449cc
[DOCS] Clarify language for supported APIs with CCS and older clusters (#70734)
* [DOCS] Clarify supported features for CCS.

* Clarify text and add subsection with title.

* Moving APIs to supported API section and paring down text.
2021-03-25 13:08:34 -04:00
Nhat Nguyen
5bb440cdca
Move point in time to server (#70704)
This change moves the implementation of point in time to the server package.
2021-03-24 14:29:20 -04:00
Nhat Nguyen
8b5aa84647
Allow format sort values of date fields (#70357)
If a search after request targets multiple indices and some of its sort 
field has type `date` in one index but `date_nanos` in other indices,
then Elasticsearch won't interpret the search_after parameter correctly
in every target index. The sort value of a date field by default is a
long of milliseconds since the epoch while a date_nanos field is a long
of nanoseconds.

This commit introduces the `format` parameter in the sort field so a 
sort value of a date or date_nanos will be formatted using a date format
in a search response.

The below example illustrates how to use this new parameter.

```js
{
    "query": {
        "match_all": {}
    },
    "sort": [
        {
            "timestamp": { 
                "order": "asc",
                "format": "strict_date_optional_time_nanos"
           }
        }
    ]
}
```

```js
{
    "query": {
        "match_all": {}
    },
    "sort": [
        {
            "timestamp": { 
                "order": "asc",
                "format": "strict_date_optional_time_nanos"
            }
        }
    ],
    "search_after": [
        "2015-01-01T12:10:30.123456789Z" // in `strict_date_optional_time_nanos` format
    ]
}
```

Closes #69192
2021-03-16 21:27:51 -04:00
István Zoltán Szabó
fead5bbb97
[DOCS] Fixes typo in async search API docs. (#70448) 2021-03-16 14:36:12 +01:00
Yang Wang
4c090aeeb4
Improve user check for resource sharing and its documentation (#69844)
The user check when accessing shared resources is improved to be more accurate. 
Also add documentation about how it works and its limitations.
2021-03-10 21:55:50 +11:00
James Rodewig
e432934e82
[DOCS] Document PIT security for aliases (#69572) 2021-03-04 08:42:42 -05:00
James Rodewig
3c70b0e3d0
[DOCS] Add xref for runtime fields (#69738) 2021-03-01 16:14:23 -05:00