Commit graph

974 commits

Author SHA1 Message Date
James Rodewig
1b51acbbab
[DOCS] Add PIT to search after docs (#61593)
Co-authored-by: Jim Ferenczi <jim.ferenczi@elastic.co>
2020-09-08 09:53:21 -04:00
James Rodewig
ea50c24eb7 [DOCS] Update shard allocation awareness xref 2020-09-02 11:32:35 -04:00
James Rodewig
f881a695e1
[DOCS] Add redirects for wildcard and constant keyword (#61815) 2020-09-01 15:32:35 -04:00
James Rodewig
49350ddae8
[DOCS] Reorg field data types page (#61117) 2020-08-26 14:01:34 -04:00
James Rodewig
590b7f1cb8 [DOCS] Fix typo in search your data docs 2020-08-25 17:00:45 -04:00
James Rodewig
915b353f36
[DOCS] Display point in time API docs (#61527) 2020-08-25 11:03:41 -04:00
Nhat Nguyen
879279c9b4
Introduce point in time APIs in x-pack basic (#61062)
This commit introduces a new API that manages point-in-times in x-pack 
basic. Elasticsearch pit (point in time) is a lightweight view into the
state of the data as it existed when initiated. A search request by
default executes against the most recent point in time. In some cases,
it is preferred to perform multiple search requests using the same point
in time. For example, if refreshes happen between search_after requests,
then the results of those requests might not be consistent as changes
happening between searches are only visible to the more recent point in
time.

A point in time must be opened before being used in search requests. The 
`keep_alive` parameter tells Elasticsearch how long it should keep a
point in time around.

```
POST /my_index/_pit?keep_alive=1m
```

The response from the above request includes a `id`, which should be 
passed to the `id` of the `pit` parameter of search requests.

```
POST /_search
{
    "query": {
        "match" : {
            "title" : "elasticsearch"
        }
    },
    "pit": {
            "id":  "46ToAwMDaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQNpZHkFdXVpZDIrBm5vZGVfMwAAAAAAAAAAKgFjA2lkeQV1dWlkMioGbm9kZV8yAAAAAAAAAAAMAWICBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
            "keep_alive": "1m"
    }
}
```

Point-in-times are automatically closed when the `keep_alive` is 
elapsed. However, keeping point-in-times has a cost; hence,
point-in-times should be closed as soon as they are no longer used in
search requests.

```
DELETE /_pit
{
    "id" : "46ToAwMDaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQNpZHkFdXVpZDIrBm5vZGVfMwAAAAAAAAAAKgFjA2lkeQV1dWlkMioGbm9kZV8yAAAAAAAAAAAMAWIBBXV1aWQyAAA="
}
```

#### Notable works in this change:

- Move the search state to the coordinating node: #52741
- Allow searches with a specific reader context: #53989
- Add the ability to acquire readers in IndexShard: #54966

Relates #46523
Relates #26472

Co-authored-by: Jim Ferenczi <jimczi@apache.org>
2020-08-24 20:24:35 -04:00
James Rodewig
d03012fbd1
[DOCS] Fix typo in profile API docs (#61445) (#61502)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: shashikumarec088 <shashikumarec088@gmail.com>
2020-08-24 15:30:25 -04:00
James Rodewig
fdc4e83050
[DOCS] Combine Search your data files (#61477)
No-op changes to:

* Move `Search your data` source files into the same directory
* Rename `Search your data` source files based on page ID
* Remove unneeded includes
* Remove the `Request` dir
2020-08-24 11:22:56 -04:00
James Rodewig
c688cb6bfd
[DOCS] Fix hyphenation for "time series" (#61472) 2020-08-24 10:34:41 -04:00
James Rodewig
d46931840b
[DOCS] Prune Search your data content (#61303)
Changes:
* Removes narrative around URI searches. These aren't commonly used in production. The `q` param is already covered in the search API docs: https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html#search-api-query-params-q
* Adds a common options section that highlights narrative docs for query DSL, aggregations, multi-index search, search fields, pagination, sorting, and async search.
* Adds a `Search shard routing` page. Moves narrative docs for adaptive replica selection, preference, routing , and shard limits to that section.
* Moves search timeout and cancellation content to the `Search your data` page.
* Creates a `Search multiple data streams and indices` page. Moves related narrative docs for multi-target syntax searches and `indices_boost` to that page.
* Removes narrative examples for the `search_type` parameters. Moves documentation for this parameter to the search API docs.
2020-08-24 08:38:20 -04:00
Nhat Nguyen
2a3a8dd296 Fix anchor doc for msearch cancellation paragraph
Relates #61418
2020-08-21 12:11:00 -04:00
James Rodewig
c21930e4ce
[DOCS] Remove URI search examples from API reference (#61423) 2020-08-21 10:57:35 -04:00
Nhat Nguyen
35ccd06918
Add cancellation doc for multi search (#61418)
Relates #61337
2020-08-21 10:10:05 -04:00
James Rodewig
a94e5cb7c4
[DOCS] Replace Wikipedia links with attribute (#61171) 2020-08-17 09:44:24 -04:00
James Rodewig
39f92f2a02
[DOCS] Fix typo in suggester docs (#61077) (#61204)
Co-authored-by: Arash Layeghi <arashlayeghi57@gmail.com>
2020-08-17 09:14:37 -04:00
James Rodewig
ea2836275c
[DOCS] Fix index boost snippet (#61023)
Updates the `indices_boost` snippet to use the `my-index-000001` index.

Removes a related REST test.
2020-08-12 09:07:57 -04:00
James Rodewig
9b9e0b7b16
[DOCS] Remove search request body page (#60972) 2020-08-11 12:05:54 -04:00
James Rodewig
00881d9f0d
[DOCS] Move post filter/rescore content to new page (#60903) 2020-08-11 08:51:22 -04:00
James Rodewig
50ab1b22aa
[DOCS] Move min_score docs to search API page (#60895)
Reformats the `min_score` docs as a param definition on the
search API reference page.
2020-08-10 09:27:23 -04:00
James Rodewig
0dc3364f84
[Docs] Combine highlighting docs files (#60849) 2020-08-10 08:24:48 -04:00
James Rodewig
ba88f0bd6a
[DOCS] Move inner hits content to separate page (#60840)
Moves inner hits content from the deprecated 'Request Body Search'
chapter to a separate page.
2020-08-06 13:47:06 -04:00
James Rodewig
6b9b8c5e31
[DOCS] Move script and stored fields content to search fields page (#60826)
Changes:

* Moves `Retrieve selected fields` to its own page and adds a title abbreviation.
* Adds existing script and stored fields content to `Retrieve selected fields`
* Adds a xref for `Retrieve selected fields` to `Search your data`
* Adds related redirects and updates existing xrefs
2020-08-06 12:45:03 -04:00
James Rodewig
929033f9dd
[DOCS] Move named query content to bool query (#60748) 2020-08-05 13:27:10 -04:00
James Rodewig
56c778235c
[DOCS] Fix metadata field refs (#60764) 2020-08-05 13:21:00 -04:00
James Rodewig
4407402924
[DOCS] Refactor snippets for Search your data (#60701)
Changes:
* Moves sample data to reusable REST test
* Add xref to pagination docs
* Removes duplicated results
* Updates the wildcard example
2020-08-05 09:32:11 -04:00
James Rodewig
c375df3c48
[DOCS] Add soft redirect for sliced scroll (#60699) 2020-08-05 09:00:29 -04:00
James Rodewig
a4dc336c16
[DOCS] Replace twitter dataset in search/agg docs (#60667) 2020-08-04 13:31:52 -04:00
Alexander Reelsen
c7ac9e7073
[DOCS] http -> https, remove outdated plugin docs (#60380)
Plugin discovery documentation contained information about installing
Elasticsearch 2.0 and installing an oracle JDK, both of which is no
longer valid.

While noticing that the instructions used cleartext HTTP to install
packages, this commit replaces HTTPs links instead of HTTP where possible.

In addition a few community links have been removed, as they do not seem
to exist anymore.
2020-07-31 15:58:38 -04:00
James Rodewig
aec26b1a23
[DOCS] Move search pagination content to one page (#60515) 2020-07-31 11:43:06 -04:00
James Rodewig
f320567e5a
[DOCS] Merge search topic and overview pages (#60459) 2020-07-30 15:01:21 -04:00
James Rodewig
af73504865
[DOCS] Move field collapse content to separate page (#60424) 2020-07-30 09:03:50 -04:00
Julie Tibshirani
8a89d95372
Add search fields parameter to support high-level field retrieval. (#60100)
This feature adds a new `fields` parameter to the search request, which
consults both the document `_source` and the mappings to fetch fields in a
consistent way. The PR merges the `field-retrieval` feature branch.

Addresses #49028 and #55363.
2020-07-27 13:25:55 -07: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
James Rodewig
d5b03f668b
[DOCS] Move search sort docs to separate page (#60123)
Moves the search sort docs from the deprecated 'Request Body Search'
page to a new subpage of 'Run a search'.

No substantive changes were made to the content.
2020-07-23 12:58:57 -04:00
James Rodewig
2774cd6938
[DOCS] Swap [float] for [discrete] (#60124)
Changes instances of `[float]` in our docs for `[discrete]`.

Asciidoctor prefers the `[discrete]` tag for floating headings:
https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
2020-07-23 11:48:22 -04:00
bellengao
a9e52194ad
[DOCS] Correct the default value of ignore_throttled param (#60036) 2020-07-22 16:34:50 -04:00
James Rodewig
c05c8bde81
[DOCS] Update search docs to use my-index dataset (#60005) 2020-07-21 15:52:00 -04:00
James Rodewig
3113f9495d
[DOCS] Introduce basic ECS logs test (#59713)
Adds a new `my-index-00001` REST test for docs snippets.

This test can serve as a lightweight replacement for
our existing `twitter` REST tests.

The new dataset is:

* Based on Apache logs, which is better aligned with Elastic use cases
* Compliant with ECS
* Similar to the existing `twitter` data set, containing the same field data types
* Lightweight, which should keep existing test runtimes roughly the same

Also updates the search API reference docs to use the new test.
2020-07-21 12:55:51 -04:00
James Rodewig
80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
James Rodewig
8170cb9cf0
[DOCS] Remove collapsible examples (#59820)
Snippets are now visible without additional clicks.
2020-07-20 08:42:56 -04:00
James Rodewig
aa3ddfeefb
[DOCS] Move highlighting docs to separate page (#59768)
Moves the highlighting docs from the deprecated 'Request Body Search'
chapter to the new subpage of the 'Run a search chapter' section.

No substantive changes were made to the content.
2020-07-17 10:15:20 -04:00
James Rodewig
69899dc2cc
[DOCS] Add data streams to validate query API (#59420) 2020-07-13 12:30:54 -04:00
James Rodewig
aa6cb874b9
[DOCS] Add data streams to field caps API docs (#59326) 2020-07-09 16:41:10 -04:00
James Rodewig
2be9db01c8
[DOCS] Replace datatype with data type (#58972) 2020-07-07 13:52:10 -04:00
James Rodewig
03d90c4945
[DOCS] Add data streams to rank eval API docs (#59069) 2020-07-07 13:16:53 -04:00
James Rodewig
9af4c1aa0e [DOCS] Fix scroll param typo 2020-07-02 08:43:45 -04:00
debadair
92851b422f
[DOCS] Fix cannot must typo. (#58884) 2020-07-01 17:44:35 -07:00
James Rodewig
c7ca1d5941 [DOCS] Make <target> defs consistent 2020-06-30 15:53:32 -04:00
James Rodewig
3d77914db7
[DOCS] Add data streams to count API (#58771) 2020-06-30 15:01:37 -04:00