Commit Graph

6010 Commits

Author SHA1 Message Date
Zachary Tong ae7c071ec7
Allow pipeline aggs to select specific buckets from multi-bucket aggs (#44179)
This adjusts the `buckets_path` parser so that pipeline aggs can
select specific buckets (via their bucket keys) instead of fetching
the entire set of buckets.  This is useful for bucket_script in
particular, which might want specific buckets for calculations.

It's possible to workaround this with `filter` aggs, but the workaround
is hacky and probably less performant.

- Adjusts documentation
- Adds a barebones AggregatorTestCase for bucket_script
- Tweaks AggTestCase to use getMockScriptService() for reductions and
pipelines.  Previously pipelines could just pass in a script service
for testing, but this didnt work for regular aggs.  The new
getMockScriptService() method fixes that issue, but needs to be used
for pipelines too.  This had a knock-on effect of touching MovFn,
AvgBucket and ScriptedMetric
2019-08-05 12:15:42 -04:00
James Rodewig 4a81606147
[DOCS] Reformats cat allocation API (#45158) 2019-08-05 11:17:37 -04:00
Yannick Welsch 245cb348d3
Add per-socket keepalive options (#44055)
Uses JDK 11's per-socket configuration of TCP keepalive (supported on Linux and Mac), see
https://bugs.openjdk.java.net/browse/JDK-8194298, and exposes these as transport settings.
By default, these options are disabled for now (i.e. fall-back to OS behavior), but we would like
to explore whether we can enable them by default, in particular to force keepalive configurations
that are better tuned for running ES.
2019-08-05 16:09:11 +02:00
James Rodewig bc83df1bff
[DOCS] Reformat cat alias API (#45119) 2019-08-05 08:27:15 -04:00
István Zoltán Szabó fbd9c9e2e3
[DOCS] Makes clearer the note under freq_rare. (#45193) 2019-08-05 13:28:22 +02:00
Nikita Glashenko ead4eb5209 Add more flexibility to MovingFunction window alignment (#44360)
Introduce shift field to MovingFunction aggregation.

By default, shift = 0. Behavior, in this case, is the same as before.
Increasing shift by 1 moves starting window position by 1 to the right.

    To simply include current bucket to the window, use shift = 1
    For center alignment (n/2 values before and after the current bucket), use shift = window / 2
    For right alignment (n values after the current bucket), use shift = window.
2019-08-02 15:09:48 -04:00
James Rodewig 08ea6a79fb
[DOCS] Update relevance score cross-references (#45092) 2019-08-02 14:15:12 -04:00
James Rodewig 8b152d6d79
Rename "indices APIs" to "index APIs" (#44863) 2019-08-02 14:09:46 -04:00
Lisa Cawley 53980c6267
[DOCS] Clarifies bucket span in overall buckets API (#45110) 2019-08-02 08:36:39 -07:00
James Rodewig a9700eee37
[DOCS] Create common parameters file for REST APIs (#45117) 2019-08-02 08:42:33 -04:00
James Rodewig e1fe213d8f
[DOCS] Reformat script score query (#45087) 2019-08-01 12:06:34 -04:00
James Rodewig 6f5cdfc23b
[DOCS] Offset clone index API headings to correct nav (#45097) 2019-08-01 11:21:11 -04:00
David Turner 7776f755ee
More logging for slow cluster state application (#45007)
Today the lag detector may remove nodes from the cluster if they fail to apply
a cluster state within a reasonable timeframe, but it is rather unclear from
the default logging that this has occurred and there is very little extra
information beyond the fact that the removed node was lagging. Moreover the
only forewarning that the lag detector might be invoked is a message indicating
that cluster state publication took unreasonably long, which does not contain
enough information to investigate the problem further.

This commit adds a good deal more detail to make the issues of slow nodes more
prominent:

- after 10 seconds (by default) we log an INFO message indicating that a
  publication is still waiting for responses from some nodes, including the
  identities of the problematic nodes.

- when the publication times out after 30 seconds (by default) we log a WARN
  message identifying the nodes that are still pending.

- the lag detector logs a more detailed warning when a fatally-lagging node is
  detected.

- if applying a cluster state takes too long then the cluster applier service
  logs a breakdown of all the tasks it ran as part of that process.
2019-08-01 08:21:40 +01:00
James Rodewig d9b2d8d9cf
[DOCS] Reformat rank feature query. Add relevance score section. (#44975) 2019-07-31 14:31:28 -04:00
James Rodewig f167b2f909
[DOCS] Update parameter format (#44703) 2019-07-31 14:18:22 -04:00
Flavio Pompermaier e66889635d [DOCS] Correct sum_other_doc_count value in terms agg example (#45028)
Closes issue #41902
2019-07-31 14:10:05 -04:00
Daniel Mitterdorfer 1f23fc704a
Clarify which circuit breaker settings are static (#44992)
Most of the circuit breaker settings are dynamically configurable.
However, `indices.breaker.total.use_real_memory` is not. With this
commit we add a clarifying note that this specific setting is static.

Closes #44974
2019-07-31 13:13:39 +02:00
Jesse Wright 3e7df14fc1 [Docs] Fix typo in rank-eval.asciidoc (#44978) 2019-07-31 12:38:26 +02:00
Nick Knize b07310022d
[SPATIAL] New ShapeFieldMapper for indexing cartesian geometries (#44980)
This commit adds a new ShapeFieldMapper to the xpack spatial module for
indexing arbitrary cartesian geometries using a new field type called shape.
The indexing approach leverages lucene's new XYShape field type which is
backed by BKD in the same manner as LatLonShape but without the WGS84
latitude longitude restrictions. The new field mapper builds on and
extends the refactoring effort in AbstractGeometryFieldMapper and accepts
shapes in either GeoJSON or WKT format (both of which support non geospatial geometries).

Tests are provided in the ShapeFieldMapperTest class in the same manner
as GeoShapeFieldMapperTests and LegacyGeoShapeFieldMapperTests.
Documentation for how to use the new field type and what parameters are
accepted is included. The QueryBuilder for searching indexed shapes is provided in a separate commit.
2019-07-30 21:52:59 -05:00
Lisa Cawley 538ce6d1e3
[DOCS] Remove xpack terminology from installation pages (#44973) 2019-07-30 14:59:20 -07:00
Lee Hinman 9677d045a5
Rename HLRC 'indexlifecycle' components to 'ilm' (#44982)
Related to #44917 and #44725, this commit renames the HLRC components
for indexlifecycle to ilm.
2019-07-30 15:09:06 -06:00
MK Swanson f47886e44a
[DOCS] Modified section headings, edited text for clarity. (#44988)
* [DOCS] Modified section headings, edited text for clarity.

* [DOCS] Modified section headings, edited text for clarity.

* [DOCS] Modified section headings, edited text for clarity.
2019-07-30 16:03:05 -04:00
Lisa Cawley 285f2e0625
[DOCS] Updates terms in machine learning get APIs (#44986) 2019-07-30 10:52:23 -07:00
István Zoltán Szabó c22296d0c2
[DOCS] Adds allow no jobs param to the GET, GET stats and Close APIs (#44503) 2019-07-30 14:22:14 +02:00
James Rodewig 3be9a3bd2c
[DOCS] Reformat script query (#44882) 2019-07-29 09:59:09 -04:00
James Rodewig a5df840c24
[DOCS] Rewrite `prefix` query docs (#41955) 2019-07-29 08:37:01 -04:00
James Rodewig 45be90954e
[DOCS] Reformat distance feature query (#44916) 2019-07-29 08:34:50 -04:00
István Zoltán Szabó b08278ef2a
[DOCS] Amends REST API TOC. (#44948) 2019-07-29 14:06:17 +02:00
Sandeep Kanabar 0e4be837db [Docs] Update daterange-aggregation.asciidoc (#44730)
Correcting the value to be the same as that specified for "missing".
2019-07-29 12:51:15 +02:00
Lisa Cawley 75999ff83c
[DOCS] Updates anomaly detection terminology (#44888) 2019-07-26 11:07:01 -07:00
Lisa Cawley 3f31859669
[DOCS] Updates terms in machine learning datafeed APIs (#44883) 2019-07-26 10:47:03 -07:00
Jason Tedor 5b2d1a5d39
Limit processors by available processors (#44894)
This commit limits the processors setting to be more than the number of
available processors.
2019-07-27 00:07:12 +09:00
István Zoltán Szabó 84793476ba
[DOCS] Amends data frame analytics resources, GET, and PUT API docs (#44806)
This PR addresses the feedback in  https://github.com/elastic/ml-team/issues/175#issuecomment-512215731.

* Adds an example to `analyzed_fields`
* Includes `source` and `dest` objects inline in the resource page
* Lists `model_memory_limit` in the PUT API page
* Amends the `analysis` section in the resource page
* Removes Properties headings in subsections
2019-07-26 11:39:59 +02:00
Tanguy Leroux 321c2b8627
Force Merge should reject requests with `only_expunge_deletes` and `max_num_segments` set (#44761)
This commit changes the ForceMergeRequest.validate() method so that it does 
not accept the parameters only_expunge_deletes and max_num_segments 
to be set at the same time.

The motivation is that InternalEngine.forceMerge() just ignores the max. number 
of segments parameter when the only expunge parameter is set to true, leaving 
the wrong impression to the user that max. number of segments has been applied. 
It also changes InternalEngine.forceMerge() so that it now throws an exception 
when both parameters are set, and modifies tests where needed.

Because it changes the behavior of the REST API I marked this as >breaking. 

Closes #43102
2019-07-26 09:34:36 +02:00
lcawl f2a6dd7250 [DOCS] Clarifies dataframe transform validations 2019-07-25 15:03:57 -07:00
Gordon Brown 5f0861aac0
Add option to filter ILM explain response (#44777)
In order to make it easier to interpret the output of the ILM Explain
API, this commit adds two request parameters to that API:

- `only_managed`, which causes the response to only contain indices
  which have `index.lifecycle.name` set
- `only_errors`, which causes the response to contain only indices in an
  ILM error state

"Error state" is defined as either being in the `ERROR` step or having
`index.lifecycle.name` set to a policy that does not exist.
2019-07-25 17:16:18 -04:00
Lisa Cawley 280b40eaa4
[DOCS] Adds command reference for elasticsearch-croneval (#43946) 2019-07-25 11:32:31 -07:00
Lisa Cawley aefb72040c
[DOCS] Updates terms in machine learning calendar APIs (#44866) 2019-07-25 11:20:42 -07:00
Yannick Welsch 76fcc81275
Add Clone Index API (#44267)
Adds an API to clone an index. This is similar to the index split and shrink APIs, just with the
difference that the number of primary shards is kept the same. In case where the filesystem
provides hard-linking capabilities, this is a very cheap operation.

Indexing cloning can be done by running `POST my_source_index/_clone/my_target_index` and it
supports the same options as the split and shrink APIs.

Closes #44128
2019-07-25 20:17:51 +02:00
Lisa Cawley 990e037728
[DOCS] Updates terms in anomaly detection job APIs (#44839) 2019-07-25 08:58:16 -07:00
István Zoltán Szabó 5275392b47
[DOCS] Adds allow no datafeeds query param to the GET, GET stats and STOP datafeed APIs (#44499) 2019-07-25 16:45:06 +02:00
Deb Adair 8ed39438df [DOCS] Adding x version of the intro blurb for the TOC. 2019-07-24 14:25:07 -07:00
Lisa Cawley 8b905cc19c
[DOCS] Adds descriptions for put and start data frame transforms (#44724) 2019-07-24 11:09:06 -07:00
Lee Hinman b0a84089b4
Order ILM actions in policy definition documentation (#44773)
We already have a note that the order of actions is up to ILM for each
phase, this commit puts the actions in the same order as they will be
executed.

Resolves #41729
2019-07-24 11:27:35 -06:00
James Rodewig 8b2493ca9f
[DOCS] Rewrite `regexp` query (#42711) 2019-07-24 08:37:37 -04:00
Andrei Stefan 8bf8a055e3
Switch from using docvalue_fields to extracting values from _source (#44062)
* Switch from using docvalue_fields to extracting values from _source
where applicable. Doing this means parsing the _source and handling the
numbers parsing just like Elasticsearch is doing it when it's indexing
a document.
* This also introduces a minor limitation: aliases type of fields that
are NOT part of a tree of sub-fields will not be able to be retrieved
anymore. field_caps API doesn't shed any light into a field being an
alias or not and at _source parsing time there is no way to know if a
root field is an alias or not. Fields of the type "a.b.c.alias" can be
extracted from docvalue_fields, only if the field they point to can be
extracted from docvalue_fields. Also, not all fields in a hierarchy of
fields can be evaluated to being an alias.
2019-07-24 13:59:02 +03:00
Jason Tedor ac5cc15308
Fix cat recovery display of bytes fields (#40379)
The cat APIs support the ?bytes parameter to format bytes value. The cat
recovery API does not follow this because the fields were not using
ByteSizeValue. This commit addresses this.
2019-07-24 00:12:04 -07:00
debadair 38cdfe5305
[DOCS] Add anchors and prune stacked notes. (#44779)
* [DOCS] Add anchors and prune stacked notes.

* [DOCS] Fixed broken xref.

* [DOCS] Fixed typo.
2019-07-23 17:45:52 -07:00
debadair c4b891907e
[DOCS] Add intro blurb to ES Ref TOC page (#44728) 2019-07-23 12:51:05 -07:00
David Roberts a40ccd91b8
[ML] Improve response format of data frame stats endpoint (#44350)
This change adjusts the data frame transforms stats
endpoint to return a structure that is easier to
understand.

This is a breaking change for clients of the data frame
transforms stats endpoint, but the feature is in beta so
stability is not guaranteed.

Closes #43767
2019-07-23 10:48:23 +01:00
David Turner 534d2e502b
Expand docs on force-merge and global ordinals (#44684)
Some small clarifications about force-merging and global ordinals, particularly
that global ordinals are cheap on a single-segment index and how this relates
to frozen indices.

Fixes #41687
2019-07-23 07:32:44 +01:00
Lisa Cawley 8e0e8c3316
[DOCS] Adds more validation details for data frame transforms (#44714) 2019-07-22 15:29:59 -07:00
David Roberts 69b6f2d8e5
[DOCS] Clarifies data frame transform frequency is also for retries (#44229)
In data frame transforms the same scheduler controls both
retries in the event of search failures and gaps between
checks for changes when the transform is running continuously.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
2019-07-22 17:52:39 +01:00
lcawl 2b65ab9e19 [DOCS] Fixes formatting in create data frame transform API 2019-07-22 08:25:31 -07:00
Benjamin Trent a9cc0e1520
[ML][Data Frame] Add optional defer_validation param to PUT (#44455)
* [ML][Data Frame] Add optional defer_validation param to PUT

* addressing PR comments

* reverting bad replace

* addressing pr comments

* Update put-transform.asciidoc

* Update put-transform.asciidoc

* Update put-transform.asciidoc
2019-07-22 09:07:53 -05:00
James Rodewig c2aabb5398
[DOCS] Make field datatype titles consistent (#43933)
* [DOCS] Make field datatype titles consistent

* Add titleabbrev for array
2019-07-22 08:51:34 -04:00
Benjamin Trent 40fccbaa50
[ML][Data Frame] adding force delete (#44590)
* [ML][Data Frame] adding force delete

* Update delete-transform.asciidoc
2019-07-22 07:32:49 -05:00
Benjamin Trent 187dc5a029
[ML][Data Frame] adding dynamic cluster setting for failure retries (#44577)
This adds a new dynamic cluster setting `xpack.data_frame.num_transform_failure_retries`.

This setting indicates how many times non-critical failures should be retried before a data frame transform is marked as failed and should stop executing. At the time of this commit; Min: 0, Max: 100, Default: 10
2019-07-19 13:50:28 -05:00
James Rodewig fab98dfa55
[DOCS] Remove heading offsets for REST APIs (#44568)
Several files in the REST APIs nav section are included using
:leveloffset: tags. This increments headings (h2 -> h3, h3 -> h4, etc.)
in those files and removes the :leveloffset: tags.

Other supporting changes:
* Alphabetizes top-level REST API nav items.
* Change 'indices APIs' heading to 'index APIs.'
* Changes 'Snapshot lifecycle management' heading to sentence case.
2019-07-19 14:35:36 -04:00
James Rodewig 3c92e8eb1a
[DOCS] Reformat `parent_id` query docs (#44449) 2019-07-19 11:03:06 -04:00
Nhat Nguyen 6be57f8da7
Return seq_no and primary_term in noop update (#44603)
With this change, we will return primary_term and seq_no of the current
document if an update is detected as a noop. We already return the
version; hence we should also return seq_no and primary_term.

Relates #42497
2019-07-19 10:57:14 -04:00
James Rodewig f3ddd36d05
[DOCS] Reformat `has_parent` query docs (#44443) 2019-07-19 10:50:36 -04:00
James Rodewig ea1adb61c2
[DOCS] Update anchors and links for Elasticsearch API relocation (#44500) 2019-07-19 09:16:35 -04:00
James Rodewig 506de3ba83
[DOCS] Replace `_meta` with `metadata` for snapshot APIs. (#44596)
elastic/elasticsearch#41281 added custom metadata parameter to
snapshots. During review, the parameter name was changed from '_meta' to
'metadata,' but the documentation wasn't updated. This corrects the
documentation to use the 'metadata' name.
2019-07-19 08:40:34 -04:00
Lisa Cawley 9413f97c1f
[DOCS] Reformat info and deprecation APIs to use new API format (#44599) 2019-07-18 16:10:22 -07:00
Lee Hinman fd822b4be2
Expose index age in ILM explain output (#44457)
* Expose index age in ILM explain output

This adds the index's age to the ILM explain output, for example:

```
{
  "indices" : {
    "ilm-000001" : {
      "index" : "ilm-000001",
      "managed" : true,
      "policy" : "full-lifecycle",
      "lifecycle_date" : "2019-07-16T19:48:22.294Z",
      "lifecycle_date_millis" : 1563306502294,
      "age" : "1.34m",
      "phase" : "hot",
      "phase_time" : "2019-07-16T19:48:22.487Z",
      ... etc ...
    }
  }
}
```

This age can be used to tell when ILM will transition the index to the
next phase, based on that phase's `min_age`.

Resolves #38988

* Expose age in getters and in HLRC
2019-07-18 15:32:52 -06:00
Lisa Cawley dbe7a48e82
[DOCS] Fixes query default value (#44572) 2019-07-18 08:15:28 -07:00
Lisa Cawley bec786d2d0
[DOCS] Clarifies data transform source definition (#44504) 2019-07-18 07:58:28 -07:00
Lisa Cawley a8918ea65f
[DOCS] Improves description of dest data frame transform object (#44509) 2019-07-18 07:43:43 -07:00
James Rodewig ec37a9cea0
[DOCS] Make Query DSL titles consistent (#43935) 2019-07-18 10:18:11 -04:00
Tal Levy b5fccd1011
Introduce Spatial Plugin (#44389)
This commit introduces a skeleton Spatial plugin that will be filled-in
with some new licensed features coming to Geo/Spatial land!
2019-07-17 14:18:31 -07:00
Lisa Cawley 4fd8e34662
[DOCS] Moves content to ML anomaly-detection folder (#44520) 2019-07-17 13:48:12 -07:00
Igor Motov 3960e1507b
Docs: fix WKTToSQL function example (#44377)
Fixes wrong example snippet in WKTToSQL documentation.

Closes #44299
2019-07-17 12:23:34 -04:00
Lisa Cawley 4e75fa355e
[DOCS] Adds sync to data frame transform API (#44254) 2019-07-17 08:55:06 -07:00
James Rodewig 724769071d
[DOCS] Move Elasticsearch APIs to REST APIs section. (#44238) (#44372)
Moves the following API sections under the REST APIs navigations:
- API Conventions
- Document APIs
- Search APIs
- Index APIs (previously named Indices APIs)
- cat APIs
- Cluster APIs

Other supporting changes:
- Removes the previous index APIs page under REST APIs. Adds a redirect for the removed page.
- Removes several [partintro] macros so the docs build correctly.
- Changes anchors for pages that become sections of a parent page.
- Adds several redirects for existing pages that become sections of a parent page.

This commit re-applies changes from #44238. Changes from that PR were reverted due to broken links in several repos. This commit adds redirects for those broken links.
2019-07-17 08:49:22 -04:00
Yannick Welsch f7e2fddee5
Move frozen indices to x-pack module (#44408)
Will facilitate future development of this feature, e.g. backporting of #44286
2019-07-17 14:02:29 +02:00
Lisa Cawley 8f31861ede
[DOCS] Renames data frame APIs section (#44458) 2019-07-16 15:09:00 -07:00
Lisa Cawley 146be77ec3
[DOCS] Separates data frame analytics APIs (#44451)
* [DOCS] Separates data frame analytics APIs

* [DOCS] Adds links between new pages
2019-07-16 13:22:27 -07:00
Mayya Sharipova 159345c493
Add positions info into term_vector doc (#44379) 2019-07-16 16:22:11 -04:00
James Rodewig bd52e148c5
[DOCS] Remove :edit_url: overrides. (#44445)
These overrides do not work in Asciidoctor and are no longer needed.
2019-07-16 15:02:38 -04:00
Yu afa9b356e4 Do not allow version in Rest Update API (#43516)
The versioning of Update API doesn't rely on version number anymore (and
rather on sequence number). But in rest api level we ignored the
"version" and "version_type" parameter, so that the server cannot raise
the exception when whey were set.

This PR restores "version" and "version_type" parsing in Update Rest API
so that we can get the appropriate errors.

Relates to #42497
2019-07-16 12:53:47 -04:00
István Zoltán Szabó 60eb7f7042
[DOCS] Adds max_page_search_size to data frame transform pivot properties (#44126) 2019-07-16 18:36:55 +02:00
Lucas Groenendaal f16ec493d2 Fix incorrect node name in docs (#43062)
After starting up elasticsearch the documentation said that their node
name was "6-bjhwl" but in the documentation's output I did not see that
node name. Instead I saw the node name as `localhost.localdomain`
2019-07-16 14:58:38 +02:00
Mark Walkom 72f7b02320 [DOCS] Update id-field.asciidoc (#42482)
Adding a note around the size limit for `_id`
2019-07-16 14:57:28 +02:00
magnusram05 0f7abd8a91 [Docs] Small update to getting-started.asciidoc (#40393) 2019-07-16 13:43:17 +02:00
James Rodewig c3c264c877
[DOCS] Add redirects for removed autogen anchors (#44380) 2019-07-15 16:18:09 -04:00
Lee Hinman a2e0db7783
Add Snapshot Lifecycle Management (#43934)
* Add SnapshotLifecycleService and related CRUD APIs

This commit adds `SnapshotLifecycleService` as a new service under the ilm
plugin. This service handles snapshot lifecycle policies by scheduling based on
the policies defined schedule.

This also includes the get, put, and delete APIs for these policies

Relates to #38461

* Make scheduledJobIds return an immutable set

* Use Object.equals for SnapshotLifecyclePolicy

* Remove unneeded TODO

* Implement ToXContentFragment on SnapshotLifecyclePolicyItem

* Copy contents of the scheduledJobIds

* Handle snapshot lifecycle policy updates and deletions (#40062)

(Note this is a PR against the `snapshot-lifecycle-management` feature branch)

This adds logic to `SnapshotLifecycleService` to handle updates and deletes for
snapshot policies. Policies with incremented versions have the old policy
cancelled and the new one scheduled. Deleted policies have their schedules
cancelled when they are no longer present in the cluster state metadata.

Relates to #38461

* Take a snapshot for the policy when the SLM policy is triggered (#40383)

(This is a PR for the `snapshot-lifecycle-management` branch)

This commit fills in `SnapshotLifecycleTask` to actually perform the
snapshotting when the policy is triggered. Currently there is no handling of the
results (other than logging) as that will be added in subsequent work.

This also adds unit tests and an integration test that schedules a policy and
ensures that a snapshot is correctly taken.

Relates to #38461

* Record most recent snapshot policy success/failure (#40619)

Keeping a record of the results of the successes and failures will aid
troubleshooting of policies and make users more confident that their
snapshots are being taken as expected.

This is the first step toward writing history in a more permanent
fashion.

* Validate snapshot lifecycle policies (#40654)

(This is a PR against the `snapshot-lifecycle-management` branch)

With the commit, we now validate the content of snapshot lifecycle policies when
the policy is being created or updated. This checks for the validity of the id,
name, schedule, and repository. Additionally, cluster state is checked to ensure
that the repository exists prior to the lifecycle being added to the cluster
state.

Part of #38461

* Hook SLM into ILM's start and stop APIs (#40871)

(This pull request is for the `snapshot-lifecycle-management` branch)

This change allows the existing `/_ilm/stop` and `/_ilm/start` APIs to also
manage snapshot lifecycle scheduling. When ILM is stopped all scheduled jobs are
cancelled.

Relates to #38461

* Add tests for SnapshotLifecyclePolicyItem (#40912)

Adds serialization tests for SnapshotLifecyclePolicyItem.

* Fix improper import in build.gradle after master merge

* Add human readable version of modified date for snapshot lifecycle policy (#41035)

* Add human readable version of modified date for snapshot lifecycle policy

This small change changes it from:

```
...
"modified_date": 1554843903242,
...
```

To

```
...
"modified_date" : "2019-04-09T21:05:03.242Z",
"modified_date_millis" : 1554843903242,
...
```

Including the `"modified_date"` field when the `?human` field is used.

Relates to #38461

* Fix test

* Add API to execute SLM policy on demand (#41038)

This commit adds the ability to perform a snapshot on demand for a policy. This
can be useful to take a snapshot immediately prior to performing some sort of
maintenance.

```json
PUT /_ilm/snapshot/<policy>/_execute
```

And it returns the response with the generated snapshot name:

```json
{
  "snapshot_name" : "production-snap-2019.04.09-rfyv3j9qreixkdbnfuw0ug"
}
```

Note that this does not allow waiting for the snapshot, and the snapshot could
still fail. It *does* record this information into the cluster state similar to
a regularly trigged SLM job.

Relates to #38461

* Add next_execution to SLM policy metadata (#41221)

* Add next_execution to SLM policy metadata

This adds the next time a snapshot lifecycle policy will be executed when
retriving a policy's metadata, for example:

```json
GET /_ilm/snapshot?human
{
  "production" : {
    "version" : 1,
    "modified_date" : "2019-04-15T21:16:21.865Z",
    "modified_date_millis" : 1555362981865,
    "policy" : {
      "name" : "<production-snap-{now/d}>",
      "schedule" : "*/30 * * * * ?",
      "repository" : "repo",
      "config" : {
        "indices" : [
          "foo-*",
          "important"
        ],
        "ignore_unavailable" : true,
        "include_global_state" : false
      }
    },
    "next_execution" : "2019-04-15T21:16:30.000Z",
    "next_execution_millis" : 1555362990000
  },
  "other" : {
    "version" : 1,
    "modified_date" : "2019-04-15T21:12:19.959Z",
    "modified_date_millis" : 1555362739959,
    "policy" : {
      "name" : "<other-snap-{now/d}>",
      "schedule" : "0 30 2 * * ?",
      "repository" : "repo",
      "config" : {
        "indices" : [
          "other"
        ],
        "ignore_unavailable" : false,
        "include_global_state" : true
      }
    },
    "next_execution" : "2019-04-16T02:30:00.000Z",
    "next_execution_millis" : 1555381800000
  }
}
```

Relates to #38461

* Fix and enhance tests

* Figured out how to Cron

* Change SLM endpoint from /_ilm/* to /_slm/* (#41320)

This commit changes the endpoint for snapshot lifecycle management from:

```
GET /_ilm/snapshot/<policy>
```

to:

```
GET /_slm/policy/<policy>
```

It mimics the ILM path only using `slm` instead of `ilm`.

Relates to #38461

* Add initial documentation for SLM (#41510)

* Add initial documentation for SLM

This adds the initial documentation for snapshot lifecycle management.

It also includes the REST spec API json files since they're sort of
documentation.

Relates to #38461

* Add `manage_slm` and `read_slm` roles (#41607)

* Add `manage_slm` and `read_slm` roles

This adds two more built in roles -

`manage_slm` which has permission to perform any of the SLM actions, as well as
stopping, starting, and retrieving the operation status of ILM.

`read_slm` which has permission to retrieve snapshot lifecycle policies as well
as retrieving the operation status of ILM.

Relates to #38461

* Add execute to the test

* Fix ilm -> slm typo in test

* Record SLM history into an index (#41707)

It is useful to have a record of the actions that Snapshot Lifecycle
Management takes, especially for the purposes of alerting when a
snapshot fails or has not been taken successfully for a certain amount of
time.

This adds the infrastructure to record SLM actions into an index that
can be queried at leisure, along with a lifecycle policy so that this
history does not grow without bound.

Additionally,
SLM automatically setting up an index + lifecycle policy leads to
`index_lifecycle` custom metadata in the cluster state, which some of
the ML tests don't know how to deal with due to setting up custom
`NamedXContentRegistry`s.  Watcher would cause the same problem, but it
is already disabled (for the same reason).

* High Level Rest Client support for SLM (#41767)

* High Level Rest Client support for SLM

This commit add HLRC support for SLM.

Relates to #38461

* Fill out documentation tests with tags

* Add more callouts and asciidoc for HLRC

* Update javadoc links to real locations

* Add security test testing SLM cluster privileges (#42678)

* Add security test testing SLM cluster privileges

This adds a test to `PermissionsIT` that uses the `manage_slm` and `read_slm`
cluster privileges.

Relates to #38461

* Don't redefine vars

*  Add Getting Started Guide for SLM  (#42878)

This commit adds a basic Getting Started Guide for SLM.

* Include SLM policy name in Snapshot metadata (#43132)

Keep track of which SLM policy in the metadata field of the Snapshots
taken by SLM. This allows users to more easily understand where the
snapshot came from, and will enable future SLM features such as
retention policies.

* Fix compilation after master merge

* [TEST] Move exception wrapping for devious exception throwing

Fixes an issue where an exception was created from one line and thrown in another.

* Fix SLM for the change to AcknowledgedResponse

* Add Snapshot Lifecycle Management Package Docs (#43535)

* Fix compilation for transport actions now that task is required

* Add a note mentioning the privileges needed for SLM (#43708)

* Add a note mentioning the privileges needed for SLM

This adds a note to the top of the "getting started with SLM"
documentation mentioning that there are two built-in privileges to
assist with creating roles for SLM users and administrators.

Relates to #38461

* Mention that you can create snapshots for indices you can't read

* Fix REST tests for new number of cluster privileges

* Mute testThatNonExistingTemplatesAreAddedImmediately (#43951)

* Fix SnapshotHistoryStoreTests after merge

* Remove overridden newResponse functions that have been removed
2019-07-15 12:04:50 -06:00
Lisa Cawley 2316703b93
[DOCS] Removes unnecessary resource definition pages (#44289)
* [DOCS] Removes calendar resource definition page

* [DOCS] Removes scheduled event and filter resource definitions
2019-07-15 09:44:57 -07:00
Julie Tibshirani af0d951993
Correct a formatting mistake in the _field_caps docs. (#44303)
The 'indices' block that was recently added should appear in the top-level of
the response, as opposed to being nested under 'fields'.
2019-07-15 09:44:25 -07:00
David Turner 0df12a8580
Fail node containing ancient closed index (#44264)
Today we fail the node at startup if it contains an index that is too old to be
compatible with the current version, unless that index is closed. If the index
is closed then the node will start up and this puts us into a bad state: the
index cannot be opened and must be reindexed using an earlier version, but we
offer no way to get that index into a node running an earlier version so that
it can be reindexed. Downgrading the node in-place is decidedly unsupported and
cannot be expected to work since the node already started up and upgraded the
rest of its metadata. Since #41731 we actively reject downgrades to versions ≥
v7.2.0 too.

This commit prevents the node from starting in the presence of any too-old
indices (closed or not). In particular, it does not write any upgraded metadata
in this situation, increasing the chances an in-place downgrade might be
successful. We still actively reject the downgrade using #41731, because we
wrote the node metadata file before checking the index metadata, but at least
there is a way to override this check.

Relates #21830, #44230
2019-07-15 15:19:22 +01:00
Dan Fey d70e36d515 [DOCS] Update split-index.asciidoc: fix shards example (#41382)
The max value should be 640 instead of 740 in the shard example:
2019-07-15 14:27:30 +02:00
David Kyle 4402cf38bf
Wait for pending tasks in docs tests cleanup (#44123)
ML and Data Frame tests should wait for pending tasks
2019-07-15 11:58:09 +01:00
Tanguy Buchier 0fb2f69052 [DOCS] Clarify refresh_interval new behavior (#43726)
Update indexing-speed.asciidoc to clarify refresh_interval new behavior
2019-07-15 11:26:56 +02:00
Armin Braun 58aae32f71
Fix Incorrect Version in Migration Docs (#44325)
* This was accidentally left at `7.3` but #33164 was merged too late and it should now be `7.4`
2019-07-15 08:40:14 +02:00
Armin Braun fe2a870668
HLRC: Fix '+' Not Correctly Encoded in GET Req. (#33164)
* HLRC: Fix '+' Not Correctly Encoded in GET Req.

* Encode `+` correctly as `%2B` in URL paths
* Keep encoding `+` as space in URL parameters
* Closes #33077
2019-07-15 08:09:49 +02:00
James Rodewig 2c1939f5f9 Revert "[DOCS] Relocate several APIs to REST APIs section (#44238)"
This reverts commit 6ebd59791a.
2019-07-12 18:06:44 -04:00
James Rodewig e5a3ae97e2 Revert "[DOCS] Fix broken links for ES API docs move (#44279)"
This reverts commit 3bdd2f4432.
2019-07-12 17:06:51 -04:00
James Rodewig 860984536c Revert "[DOCS] Fix broken link reused in Stack Overview"
This reverts commit c08c253432.
2019-07-12 17:06:44 -04:00
James Rodewig f9c09fa7f6 Revert "[DOCS] Fix broken links"
This reverts commit 313030263f.
2019-07-12 17:06:28 -04:00
James Rodewig 313030263f [DOCS] Fix broken links 2019-07-12 14:03:30 -04:00
James Rodewig c08c253432 [DOCS] Fix broken link reused in Stack Overview 2019-07-12 13:15:05 -04:00
James Rodewig 3bdd2f4432
[DOCS] Fix broken links for ES API docs move (#44279)
* [DOCS] Fix broken links for ES API docs move

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
2019-07-12 12:46:22 -04:00
Zachary Tong eac86c9bb8
Document that pipeline aggs are not compatible with composite agg (#44180) 2019-07-12 12:34:34 -04:00
James Rodewig 562d609c45 [DOCS] Relocate several APIs to REST APIs section (#44238) 2019-07-12 12:15:01 -04:00
Nikita Glashenko a85199286d Support WKT point conversion to geo_point type (#44107)
This PR adds support for parsing geo_point values from WKT POINT format.
Also, a few minor bugs in geo_point parsing were fixed.

Closes #41821
2019-07-12 11:44:59 -04:00
Lisa Cawley b3a7b2221b
[DOCS] Reformats API parameter details (#44194) 2019-07-12 08:26:31 -07:00
Lisa Cawley 727199e398
[DOCS] Removes links to ML tutorial (#44251) 2019-07-12 08:25:23 -07:00
Tal Levy 5e285f25d1
update docs referencing allowed script types (#44143)
- javadoc fix referencing incorrect number of script types
- explicitely mention ability to specify stored script type
  in the allowed_types setting
2019-07-12 08:09:11 -07:00
James Rodewig 3bdeb45ed7 Revert "[DOCS] Relocate several APIs to REST APIs section (#44238)"
This reverts commit 6ebd59791a.
2019-07-11 17:00:45 -04:00
James Rodewig 6ebd59791a
[DOCS] Relocate several APIs to REST APIs section (#44238) 2019-07-11 16:22:57 -04:00
John Murphy 8a5a01fc12 [DOCS] Add `lowercase` filter to phrase suggester example so searches are case insensitive (#44186) 2019-07-11 15:08:22 -04:00
Mayya Sharipova 16747f811f
Add l1norm and l2norm distances for vectors (#44116)
* Add l1norm and l2norm distances for vectors

Add L1norm - Manhattan distance
Add L2norm - Euclidean distance
relates to #37947

* Address Christoph's feedback

- organize vector functions as a separate doc
- increase precision in tests calculations
- add a separate test when sparse doc dims
are bigger and less than query vector dims

* Made examples more realistic
2019-07-11 14:14:23 -04:00
István Zoltán Szabó 74c16efe2a
[DOCS] Adds data frame analytics API and evaluate API resource documentation (#43972)
This PR adds the resource documentation of the data frame analytics APIs and the evaluate API to the ML API doc pool.
2019-07-11 18:05:05 +02:00
James Rodewig e04c8464c7
[DOCS] Rewrite `has_child` query to use new format (#44190) 2019-07-11 09:10:39 -04:00
Tim Vernum 58636fe7b2
Document xpack.security.dls.bitset.cache settings (#44100)
Two new settings were introduced in #43669 (bb130f5) to control the
behaviour of the Document Level Security BitSet cache.

This change adds documentation for these 2 settings.
2019-07-11 17:13:20 +10:00
lcawl c9a265b092 [DOCS] Fixes formatting in data frame analytics API 2019-07-10 17:58:17 -07:00
Lisa Cawley ae97d4c943
[DOCS] Reformat rollup APIs to use new API format (#44131) 2019-07-10 15:12:32 -07:00
Lisa Cawley 98b47fcc2d
[DOCS] Minor edits to data frame APIs (#44138) 2019-07-10 14:39:38 -07:00
Lisa Cawley 2845db2c43
[DOCS] Adds frequency option to data frame transform resource (#44177) 2019-07-10 14:38:32 -07:00
James Rodewig 4ad081b1e7 [DOCS] Correct `ignore_unmapped` parm typo for nested query 2019-07-10 10:08:36 -04:00
Andrei Stefan d589dcad18
SQL: double quotes escaping bug fix (#43829) 2019-07-10 16:03:44 +03:00
James Rodewig 593e1636ab
[DOCS] Rewrite nested query to use new format (#44130) 2019-07-10 08:50:54 -04:00
Albert Zaharovits 3538cff422
[DOC] Backup & Restore Security Configuration (#42970)
This commit documents the backup and restore of a cluster's
security configuration.

It is not possible to only backup (or only restore) security
configuration, independent to the rest of the cluster's conf,
so this describes how a full configuration backup&restore
will include security as well. Moreover, it explains how part
of the security conf data resides on the special .security
index and how to backup that using regular data snapshot API.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
Co-Authored-By: Tim Vernum <tim@adjective.org>
2019-07-10 14:05:01 +03:00
David Roberts b89c3c92e0
[ML-DataFrame] Add a frequency option to transform config, default 1m (#44120)
Previously a data frame transform would check whether the
source index was changed every 10 seconds. Sometimes it
may be desirable for the check to be done less frequently.
This commit increases the default to 60 seconds but also
allows the frequency to be overridden by a setting in the
data frame transform config.
2019-07-10 09:35:23 +01:00
Przemysław Witek 1572080a63
[ML] Add DatafeedTimingStats to datafeed GetDatafeedStatsAction.Response (#43045) 2019-07-09 16:07:27 +02:00
David Kyle 071b652874 Mute put job docs test
Relates to #43271
2019-07-09 13:15:25 +01:00
Ioannis Kakavas 6ec2647ad3
Do not set a NameID format in Policy by default (#44090)
This commit changes the behavior of our SAML realm to not set a
Format element in the NameIDPolicy of a SAML Authentication
request if one has not been explicitly configured by the user
with `nameid_format`. We select to not include a format, rather
than setting it to
`urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified` which would
have the same effect, in order to maximize interoperability with
IdP implementations. `AllowCreate` is not removed as this has a
default value (false) in the specification.

Relates: #40353
2019-07-09 13:35:18 +03:00
Lisa Cawley 56de569c69
[DOCS] Defines data frame transform resources (#43996)
Co-Authored-By: István Zoltán Szabó <istvan.szabo@elastic.co>
2019-07-08 15:41:45 -07:00
Lisa Cawley 0601aaf621
[DOCS] Enables testing for create job ML API (#44022) 2019-07-08 11:25:21 -07:00
Lisa Cawley f60b35cbcc
[DOCS] Fixes earliest_record_timestamp data type (#44030) 2019-07-08 10:14:37 -07:00
Lisa Cawley f787c3bddf
[DOCS] Reformat freeze unfreeze APis to use new API format (#43948) 2019-07-08 08:56:30 -07:00
James Rodewig f339df59e0
[DOCS] Clarify array is not a field datatype (#43931) 2019-07-08 08:56:51 -04:00
Mayya Sharipova 5255eb3c77
Forbid empty doc values on vector functions (#43944)
Currently when a document misses a vector value, vector function
returns 0 as a score for this document. We think this is incorrect
behaviour.
With this change, an error will be thrown if vector functions are
used with docs that are missing vector doc values.
Also VectorScriptDocValues is modified to allow size() function,
which can be used to check if a document has a value for the
vector field.
2019-07-05 17:59:13 -04:00
Nhat Nguyen 54d1a3dc2e
Clarify consequence of translog async setting (#44020)
Relates #43915
2019-07-05 13:55:25 -04:00
Akshesh Doshi 778e47f21f Draw attention to transport layer in remote cluster docs (#43883)
Closes #43858
2019-07-05 13:42:56 +02:00
István Zoltán Szabó cccf5bac43
[DOCS] Adds data frame analytics APIs to the ML APIs (#43875)
This PR adds the reference documentation pages of the data frame analytics APIs (PUT, START, STOP, GET, GET stats, DELETE, Evaluate) to the ML APIs pool.
2019-07-05 13:34:05 +02:00
István Zoltán Szabó b8f1bd09cd
[DOCS] Adds description to the preview data frame transform API (#43745) 2019-07-05 09:38:21 +02:00
lcawl 4e53fd04a0 [DOCS] Fixes broken link 2019-07-04 09:13:00 -07:00
Armin Braun d6e23e9bd5
Provide an Option to Use Path-Style-Access with S3 Repo (#41966)
* Provide an Option to Use Path-Style-Access with S3 Repo

* As discussed, added the option to use path style access back again and
deprecated it.
* Defaulted to `false`
* Added warning to docs

* Closes #41816
2019-07-04 17:37:47 +02:00
Lisa Cawley 19dbeda54f
[DOCS] Reformat CCR APIs to use new API format (#43952) 2019-07-04 08:22:17 -07:00
James Rodewig 0753b412cc
[DOCS] Rewrite dis max query (#43586) 2019-07-03 08:55:50 -04:00
Jay Modi 0a41b13cd8 Remove the client transport profile filter (#43236)
Now that the transport client has been removed, the client transport
profile filter can be removed from security. This filter prevented node
actions from being executed using a transport client.
2019-07-03 19:32:24 +10:00
Christoph Büscher 1f61152591
Add _reload_search_analyzers endpoint to HLRC (#43733)
This change adds the new endpoint that allows reloading of search analyzers to
the high-level java rest client.

Relates to #43313
2019-07-03 11:27:37 +02:00
debadair 66ce3f2b24
[DOCS] Revise GS intro & remove redundant conceptual info. Closes #43846 (#43847)
* [DOCS] Revise GS intro and remove redundant conceptual content. Closes #43846.

* [DOCS] Incorporated feedback.

* [DOCS] Abbreviated titles for parts don't work in  AsciiDoctor.
2019-07-02 15:10:55 -07:00
Mayya Sharipova 66e1e5643f
Add dims parameter to dense_vector mapping (#43444)
Typically, dense vectors of both documents and queries must have the same
number of dimensions. Different number of dimensions among documents
or query vector indicate an error. This PR enforces that all vectors
for the same field have the same number of dimensions. It also enforces
that query vectors have the same number of dimensions.
2019-07-02 16:21:10 -04:00
Zachary Tong 3e1f73ffa3
Link rare_terms docs from index page (#43882)
Docs for rare_terms were added in #35718, but neglected to
link it from the bucket index page
2019-07-02 13:10:46 -04:00
Yannick Welsch 5ecf669c38
Clarify voting-only master node docs (#43857)
Clarifies the roles of a dedicated voting-only master-eligible node.

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
Co-Authored-By: David Turner <david.turner@elastic.co>
2019-07-02 18:48:29 +02:00
Christoph Büscher 3cc222ed1d
Return reloaded analyzers in _reload_search_ananlyzer response (#43813)
Currently the repsonse of the "_reload_search_analyzer" endpoint contains the
index names and nodeIds of indices were analyzers reloading was triggered. This
change add the names of the search-time analyzers that were reloaded.

Closes #43804
2019-07-02 18:08:04 +02:00
Alexander Reelsen d52972e9e2
Update docs to refer to 6.8 instead of 6.7 (#43685)
A few places in the documentation had mentioned 6.7 as the version to
upgrade from, when doing an upgrade to 7.0. While this is technically
possible, this commit will replace all those mentions to 6.8, as this is
the latest version with the latest bugfixes, deprecation checks and
ugprade assistant features - which should be the one used for upgrades.

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-07-02 09:06:14 +02:00
Benjamin Trent eea47bbe77
[ML][Data Frame] Add deduced mappings to _preview response payload (#43742)
* [ML][Data Frame] Add deduced mappings to _preview response payload

* updating preview docs
2019-07-01 20:23:44 -05:00
Christoph Büscher 7cf84f9943
Yet another `the the` cleanup (#43815) 2019-07-01 16:25:40 +02:00
Zachary Tong baf155dced
Add RareTerms aggregation (#35718)
This adds a `rare_terms` aggregation.  It is an aggregation designed
to identify the long-tail of keywords, e.g. terms that are "rare" or
have low doc counts.

This aggregation is designed to be more memory efficient than the
alternative, which is setting a terms aggregation to size: LONG_MAX
(or worse, ordering a terms agg by count ascending, which has
unbounded error).

This aggregation works by maintaining a map of terms that have
been seen. A counter associated with each value is incremented
when we see the term again.  If the counter surpasses a predefined
threshold, the term is removed from the map and inserted into a cuckoo
filter.  If a future term is found in the cuckoo filter we assume it
was previously removed from the map and is "common".

The map keys are the "rare" terms after collection is done.
2019-07-01 10:02:36 -04:00
Tanguy Leroux 8f777263d8
Update docs for Open/Close API (#43809)
Relates #43530
2019-07-01 15:19:44 +02:00
David Turner b73f4e934c
Avoid IP addresses for bootstrapping in setup docs (#43802)
Removes the suggestion to use IP addresses for `cluster.initial_master_nodes`
in the "important settings" discovery docs, leaving only the suggestion to use
node names.

Relates #41179, #41569
2019-07-01 12:39:12 +01:00
Dimitrios Liappis b42bcf5e9f
Update TLS configuration in Docker docs (#43748)
Following the removal of the `unzip` package from the Elasticsearch 
Docker image in #39040, update setup instructions for TLS in Docker.

Also avoid cross-platform ownership+permission issues by not relying
on local bind mounts for storing generated certs and don't require 
`curl` locally installed.
2019-07-01 14:38:29 +03:00
weizijun 0fe62de217 show a full ingest example in the index page, to let user fast understand ingest node. (#43476) 2019-07-01 08:04:26 +02:00
James Rodewig b490eab3a5
[DOCS] Rewrite `terms_set` query (#43060) 2019-06-28 12:56:22 -04:00
Alan Woodward 89a3eb3c6f
Wildcard intervals (#43691)
This commit adds a wildcard intervals source, similar to the prefix. It
also changes the term parameter in prefix to read prefix, to bring it
in to line with the pattern parameter in wildcard.

Closes #43198
2019-06-28 13:58:06 +01:00
James Rodewig 623a5ddac0
[DOCS] Rewrite boosting query (#43647) 2019-06-28 08:35:20 -04:00
Julie Tibshirani f3317eb82d
Add support for 'flattened object' fields. (#42541)
This commit merges the `object-fields` feature branch. The new 'flattened
object' field type allows an entire JSON object to be indexed into a field, and
provides limited search functionality over the field's contents.
2019-06-28 15:33:24 +03:00
Henning Andersen b92de2845b
Enabled cannot be updated (#43701)
Removed the invalid tip that enabled can be updated for existing fields
and clarified instead that it cannot.

Related to #33566 and #33933
2019-06-28 12:58:22 +02:00
Lisa Cawley f1e3a8fd6c
[DOCS] Adds data frame API response codes for allow_no_match (#43666) 2019-06-27 15:16:24 -07:00
Lisa Cawley c75773745c
[DOCS] Updates ML APIs to use new API template (#43711) 2019-06-27 13:58:42 -07:00
lcawl 66e1853f34 [DOCS] Adds anchors and attributes to ML APIs 2019-06-27 09:43:43 -07:00
Christoph Büscher 56ee1a5e00
Allow reloading of search time analyzers (#43313)
Currently changing resources (like dictionaries, synonym files etc...) of search
time analyzers is only possible by closing an index, changing the underlying
resource (e.g. synonym files) and then re-opening the index for the change to
take effect.

This PR adds a new API endpoint that allows triggering reloading of certain
analysis resources (currently token filters) that will then pick up changes in
underlying file resources. To achieve this we introduce a new type of custom
analyzer (ReloadableCustomAnalyzer) that uses a ReuseStrategy that allows
swapping out analysis components. Custom analyzers that contain filters that are
markes as "updateable" will automatically choose this implementation. This PR
also adds this capability to `synonym` token filters for use in search time
analyzers.

Relates to #29051
2019-06-27 18:27:11 +02:00
Jim Ferenczi a614415838
Remove deprecated sort options: nested_path and nested_filter (#42809)
This commit removes the nested_path and nested_filter options deprecated in 6x.
This change also checks that the sort field has a [nested] option if it is under a nested
object and throws an exception if it's not the case.

Closes #27098
2019-06-27 17:30:02 +02:00
Alan Woodward d2c696d54b
Require [articles] setting in elision filter (#43083)
We should throw an exception at construction time if a list of
articles is not provided, otherwise we can get random NPEs during
indexing.

Relates to #43002
2019-06-27 08:56:26 +01:00
Julie Tibshirani 98ed5e985f
Make the ignore_above docs tests more robust. (#43349)
It is possible for internal ML indices like `.data-frame-notifications-1` to leak,
causing other docs tests to fail when they accidentally search over these
indices. This PR updates the ignore_above tests to only search a specific index.
2019-06-27 08:27:01 +03:00
Lisa Cawley 0d05ec46c2
[DOCS] Updates data frame APIs to use API template (#43610) 2019-06-26 13:46:21 -07:00
James Rodewig 1594892312
[DOCS] Change 'X-Pack APIs' section to 'REST APIs' (#43451) 2019-06-26 13:44:33 -04:00
Alan Woodward a520a5d761
Add prefix intervals source (#43635)
This commit adds a prefix intervals source, allowing you to search
for intervals that contain terms starting with a given prefix. The source
can make use of the index_prefixes mapping option.

Relates to #43198
2019-06-26 15:36:47 +01:00
Benjamin Trent 9084418937
[ML][Data Frame] Add support for allow_no_match for endpoints (#43490)
* [ML][Data Frame] Add support for allow_no_match parameter in endpoints

Adds support for:
* Get Transforms
* Get Transforms stats
* stop transforms
2019-06-26 06:55:50 -05:00
Henning Andersen ac3e4a6799
Reindex remove outer level size (#43373)
This commit finalizes the work done to rename size to max_docs in
reindex and update/delete by query. size is no longer supported in URL
or outer level body for the 3 APIs (though size in update/delete-by-query
will and has always been interpreted as scroll_size, it is not to be relied
upon).

Continuation of #41894

Closes #24344
2019-06-26 09:36:17 +02:00
James Rodewig 5f6321aacb
[DOCS] Rewrite `range` query (#43282) 2019-06-25 15:24:44 -04:00
David Roberts 76ad7d8464
[ML] Introduce a setting for the process connect timeout (#43234)
This change introduces a new setting,
xpack.ml.process_connect_timeout, to enable
the timeout for one of the external ML processes
to connect to the ES JVM to be increased.

The timeout may need to be increased if many
processes are being started simultaneously on
the same machine. This is unlikely in clusters
with many ML nodes, as we balance the processes
across the ML nodes, but can happen in clusters
with a single ML node and a high value for
xpack.ml.node_concurrent_job_allocations.
2019-06-25 16:36:02 +01:00
Yannick Welsch e689b20eba
Add voting-only master node (#43410)
A voting-only master-eligible node is a node that can participate in master elections but will not act
as a master in the cluster. In particular, a voting-only node can help elect another master-eligible
node as master, and can serve as a tiebreaker in elections. High availability (HA) clusters require at
least three master-eligible nodes, so that if one of the three nodes is down, then the remaining two
can still elect a master amongst them-selves. This only requires one of the two remaining nodes to
have the capability to act as master, but both need to have voting powers. This means that one of
the three master-eligible nodes can be made as voting-only. If this voting-only node is a dedicated
master, a less powerful machine or a smaller heap-size can be chosen for this node. Alternatively, a
voting-only non-dedicated master node can play the role of the third master-eligible node, which
allows running an HA cluster with only two dedicated master nodes.

Closes #14340

Co-authored-by: David Turner <david.turner@elastic.co>
2019-06-25 17:29:30 +02:00
rbayet 05689de55f
Fixing backquote in fail_on_unsupported_field (#43572) 2019-06-25 16:35:13 +02:00
Ernesto Reig c184150d88
Default number of shards is now 1 instead of 5 (#43573)
As specified in the [Breaking changes for 7.X](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/breaking-changes-7.0.html#breaking_70_indices_changes), the default number of shards for an index is now `1` instead of `5`.
2019-06-25 14:51:22 +02:00
Andrey Ershov b4f30cf1ed
Get snapshots response example for the breaking change (#43475)
#42090 PR added support
for requesting snapshots from multiple repositories. And it has changed
the response format in a non-BwC way.
There is a mentioning of a response format change in the breaking
changes docs, however, there is no example of how new format looks
like. Pointed out by @dakrone.
This commit adds the missing example.
2019-06-25 10:37:06 +03:00
debadair db7731d628
[DOCS] Edited title/subtitle. (#43552) 2019-06-24 15:29:47 -07:00
Lisa Cawley 23ff9d4011
[DOCS] Adds administering section (#43493) 2019-06-24 10:14:12 -07:00
David Roberts 1907065783 [DOCS] Rename "job" to "transform" in data frame transform docs (#43534) 2019-06-24 08:56:18 -07:00
Matthew Adams 4c8f089ebd Clarify storage location of ML Snapshots (#43437)
The existing language was misleading about the model snapshots and where they are located. Saying "to disk" sounds like files external to Elasticsearch IMO. It raises the obvious question, where on disk? which node? Is it in the Elasticsearch snapshot repo? The model snapshots are held in an internal index.
2019-06-24 09:13:21 +01:00
James Rodewig 086c330923
[DOCS] Rewrite `constant_score` query (#43374) 2019-06-21 12:03:19 -04:00
James Rodewig 97f70c5e27
[DOCS] Rewrite term-level queries overview (#43337) 2019-06-21 11:53:01 -04:00
Luiz Guilherme Pais dos Santos 4fcb951f21 Example of how to set slow logs dynamically per-index (#42384)
* Example of how to set slow logs dynamically per-index

* Make _settings API example more explicit

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>

* Add TEST directive to fix CI

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-06-21 09:25:11 -04:00
Yu e8ea83116c Make Recovery API support `detailed` params (#29076)
Properly forwards the `detailed` parameter to show the recovery stats details.

Closes #28910
2019-06-21 09:02:23 +02:00
Ryan Ernst f879e84e5a
Clarify unsupported secure settings behavior (#43454)
This commit tweaks the docs for secure settings to ensure the user is
aware adding non secure settings to the keystore will result in
elasticsearch not starting.

fixes #43328

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-06-20 14:27:07 -07:00
Deb Adair bb04837ca6 [DOCS] Updated the URL for starting in the cloud. 2019-06-20 13:01:50 -07:00
debadair d0984dbdbf
[DOCS] Added blurb & link to Elasticsearch Service. (#43452) 2019-06-20 12:51:04 -07:00
debadair 19c253ccc9
[DOCS] Fixed path to install directory. (#43443) 2019-06-20 10:33:54 -07:00
debadair f3ed2bd693 [DOCS] Add brew install instructions. Closes #42914 (#42915) 2019-06-20 07:49:50 -07:00
David Kyle 2f9e8a8317 Mute put-transform docs test
Relates to #43271
2019-06-20 15:35:56 +01:00
Lisa Cawley 2e24f09461
[DOCS] Describe setup for monitoring logs (#42655) 2019-06-20 07:22:18 -07:00
Igor Motov 77639213bb
Docs: Add description of the coerce parameter in geo_shape mapper (#43340)
Explains the effect of the coerce parameter on the geo_shape field.

Relates #35059
2019-06-20 05:15:59 -07:00
Christoph Büscher b08ba28c9b
[Docs] Remove boost parameter from intervals-query example (#43331)
The boost factor doesn't seem to be needed and can be removed.
2019-06-20 10:33:48 +02:00
Andrei Stefan c5190106cb
Remove mentions of "fields with the same name in the same index" (#43077)
Together with types removal, any mention of "fields with the same name in the same index" doesn't make sense anymore.
2019-06-20 10:15:43 +03:00
Benjamin Trent 9f2974985f
[ML][Data Frame] adds new pipeline field to dest config (#43124)
* [ML][Data Frame] adds new pipeline field to dest config

* Adding pipeline support to _preview

* removing unused import

* moving towards extracting _source from pipeline simulation

* fixing permission requirement, adding _index entry to doc
2019-06-19 12:58:11 -05:00
Jason Tedor 3c6bc34c72
Fix GeoIP custom database directory in docs (#43383)
These docs were misleading for package installations of
Elasticsearch. Instead, we should refer to $ES_CONFIG/ingest-geoip as
the path to place the custom database files. For non-package
installations, this is the same as $ES_HOME/config, but for package
installations this is not the case as the config directory for package
installations is /etc/elasticsearch, and is not relative to
$ES_HOME. This commit corrects the docs.
2019-06-19 13:25:02 -04:00
Ryan Ernst b638cc101f
Remove native code info from xpack info api (#43125)
The native code info is a portion of the xpack info api that emits
arbitrary info about feature plugins that are backed by native code.
This is currently only used by machine learning. Additionally, it is the
only non enabled/available information reported by the info api.

This commit moves the native code info reporting to the usage api for
machine learning. The commit info reported is only used for debugging
purposes, and not captured by the current uses of the info api
(monitoring and telemetry) since it requires passing the verbose flag.

Long term, this information would be better suited to node info. Until
node info is extendable by plugins, this new location will allow
cleaning up the xpack info api to be implemented in a generic way for
all xpack features.
2019-06-19 08:57:56 -07:00
Andrey Ershov 680d6edc0b
Get snapshots support for multiple repositories (#42090)
This commit adds multiple repositories support to get snapshots
request.
If some repository throws an exception this method does not fail fast
instead, it returns results for all repositories.
This PR is opened in favour of #41799, because we decided to change
the response format in a non-BwC manner. It makes sense to read a
discussion of the aforementioned PR.
This is the continuation of work done here #15151.
2019-06-19 16:04:13 +03:00
Tal Levy 13dde65e75
specifies which index to search in docs for various queries (#43307)
the geo-bounding-box and phrase-suggest docs were susceptible to
failing due to other indices in the cluster. This change restricts
the queries to the index that is set up for the test.

relates to #43271.
2019-06-18 08:18:50 -07:00
Colin Goodheart-Smithe aeb2110dd0
Fixes formatting of CCS compatibility table (#43231) 2019-06-18 13:27:29 +01:00
Mayya Sharipova 952ddf247a
Move dense_vector and sparse_vector to module (#43280) 2019-06-18 08:15:46 -04:00
debadair 5c209535e9
[DOCS] Sewing SME says it should be "size 70" needle. 2019-06-17 19:56:44 -07:00
debadair 6ddc4243a5
[DOCS] Fix typo: extraneous {es} 2019-06-17 19:18:51 -07:00
debadair 3fffe41867
[DOCS] Add introduction to Elasticsearch. (#43075)
* [DOCS] Add introduction to Elasticsearch.

* [DOCS] Incorporated review comments.

* [DOCS] Minor edits to add an abbreviated title and cross refs.

* [DOCS] Added sizing tips & link to quantatative sizing video.
2019-06-17 16:57:43 -07:00
Brandon Morelli 3ba3861e7b
Remove unneeded backticks (#43256) 2019-06-17 08:58:47 -07:00
Brandon Morelli bcb77b4fde
[docs] Add missing comma (#43073)
Adds a missing comma to a code example
2019-06-17 06:52:48 -07:00
István Zoltán Szabó 7d1784e1ef
[DOCS] Simplifies wording. (#43226)
This PR simplifies the wording of the TOC and eventually makes it shorter.
2019-06-17 09:33:57 +02:00
Przemysław Witek 13596c807a
Report exponential_avg_bucket_processing_time which gives more weight to recent buckets (#43189) 2019-06-16 20:41:27 +02:00
Lisa Cawley 41bd5b1e9c
[DOCS] Adds size and from parameters to data frame APIs (#43212) 2019-06-14 08:42:18 -07:00
Marios Trivyzas 079e012fde
SQL: Increase hard limit for sorting on aggregates (#43220)
To be consistent with the `search.max_buckets` default setting,
set the hard limit of the PriorityQueue used for in memory sorting,
when sorting on an aggregate function, to 10000.

Fixes: #43168
2019-06-14 13:26:18 +02:00
Jason Tedor aa12af8a3c
Enable node roles to be pluggable (#43175)
This commit introduces the possibility for a plugin to introduce
additional node roles.
2019-06-13 14:43:14 -04:00
Ryan Ernst a3f2f4079c
Add native code info to ML info api (#43172)
The machine learning feature of xpack has native binaries with a
different commit id than the rest of code. It is currently exposed in
the xpack info api. This commit adds that commit information to the ML
info api, so that it may be removed from the info api.
2019-06-13 11:38:29 -07:00
lcawl aa4ff855a6 [DOCS] Fix link to ML node description 2019-06-13 11:17:12 -07:00
Lisa Cawley 0140d512f9
[DOCS] Update node descriptions for default distribution (#42812) 2019-06-13 09:46:55 -07:00
Luca Cavanna 98ca0d3972
Add 6.8 to the remote clusters compatibility table (#42389)
The table does not include 6.8 as it was written before we knew we were releasing it. This commit adds it.
2019-06-13 11:18:07 +02:00
Mirek Svoboda eaf76d2a32 Document wildcard for network interfaces (#28839)
With this commit we mention how Elasticsearch behaves when
either `0` or `0.0.0.0` is used for `network.host`.
2019-06-13 10:19:18 +02:00
Lisa Cawley bf5bfcc15a
[DOCS] Adds dataframe authorization details (#43009) 2019-06-12 10:13:04 -07:00
markharwood 58da54e2d0
Docs change for exists query. (#43092)
Now emphasises the test is for indexed values.
Previous documentation only mentioned the state of the input JSON doc (null values) but this is only one of several reasons why an indexed value may not exist.

Closes #24256
2019-06-12 09:26:26 +01:00
Shaunak Kashyap aecb7ae9fe
Metricbeat monitoring Elasticsearch: Reorder/remove steps (#42917) 2019-06-11 16:35:43 -07:00
Paul Sanwald 6357857bba
Adds a minimum interval to `auto_date_histogram`. (#42814)
Adds a minimum interval to `auto_date_histogram`. We do this by
restricting the roundings passed into to the aggregator.
2019-06-11 15:53:19 -04:00
Ryan Ernst b3a60da5d5
Remove description from xpack feature sets (#43065)
The description field of xpack featuresets is optionally part of the
xpack info api, when using the verbose flag. However, this information
is unnecessary, as it is better left for documentation (and the existing
descriptions describe anything meaningful). This commit removes the
description field from feature sets.
2019-06-11 09:20:55 -07:00
markharwood ba02170566
Docs enhancement for quote_field_suffix. (#43093)
* Docs enhancement for quote_field_suffix.
Mentions the use of a fall-back field when specified field is missing.
Closes #40778
2019-06-11 16:23:04 +01:00
Andrei Stefan 897b24e056
Rename TESTRESPONSE[_cat] to TESTRESPONSE[non_json] (#43087) 2019-06-11 12:38:26 +03:00
Andrei Stefan 309bd691ff
Restructure the SQL Language section to have proper sub-sections (#43007)
Rest docs page update
- have the section be on separate pages
- add an Overview page
- add other formats examples
2019-06-11 12:04:00 +03:00
Andrei Stefan 406d5281bd
SQL: Clarify that the connections the jdbc driver creates are not pooled (#42992) 2019-06-11 12:02:46 +03:00
Luca Cavanna 640ca7d9a4
[DOCS] Clarify phrase suggester docs smoothing parameter (#42947)
Closes #28512
2019-06-11 10:13:03 +02:00
Benjamin Trent 82adbce9ca
[ML] Adding support for geo_shape, geo_centroid, geo_point in datafeeds (#42969)
* [ML] Adding support for geo_shape, geo_centroid, geo_point in datafeeds

* only supporting doc_values for geo_point fields

* moving validation into GeoPointField ctor
2019-06-10 16:48:36 -05:00
James Rodewig 655032b07e
[DOCS] Change `// TESTRESPONSE[_cat]` to `// TESTRESPONSE[non_json]` (#43006) 2019-06-10 09:33:32 -04:00
Sachin Frayne 31a37fbb00 Correct the description of generate_word_parts (#43026) 2019-06-10 11:37:34 +01:00
Sam Mingo 0ce3a28ebb Update search-settings.asciidoc (#43016)
Grammar and spelling fixes
2019-06-10 10:14:27 +01:00
Shubham Vipul Majmudar 1fa67ce85f Update regexp-syntax.asciidoc (#43021)
Corrects a typo.
2019-06-10 10:14:18 +01:00
Jason Matthews f7dd959487 Fix typo in create-index.asciidoc (#41806) 2019-06-10 11:58:46 +03:00
Jason Tedor eafec44513
Add note to CCR docs about mapping/alias updates
This commit adds a note to the docs clarifying that it is not possible
to manually update the mapping nor the aliases of a follower index.
2019-06-09 22:56:24 -04:00
Jason Tedor bef4af10b0
Add note to CCR docs regarding alias replication
This commit adds a note to the docs regarding the automatic replication
of aliases by a follower index from its leader index.
2019-06-09 22:54:27 -04:00
James Rodewig 8685a7b8d2
[DOCS] Add explicit `articles_case` parameter to Elision Token Filter example (#42987) 2019-06-07 11:22:32 -04:00
Peter Dyson 38ea4efe1d shrink may full copy when using multi data paths (#42913)
Additional scenario for full segment copy if hard link
cannot work across disks.
2019-06-06 13:00:00 -04:00
James Rodewig fb079e527c
[DOCS] Move 'Scripting' section to top-level navigation. (#42939) 2019-06-06 10:45:04 -04:00
Henning Andersen a6b5aaa3b4
Reindex max_docs parameter name (#41894)
Previously, a reindex request had two different size specifications in the body:
* Outer level, determining the maximum documents to process
* Inside the source element, determining the scroll/batch size.

The outer level size has now been renamed to max_docs to
avoid confusion and clarify its semantics, with backwards compatibility and
deprecation warnings for using size.
Similarly, the size parameter has been renamed to max_docs for
update/delete-by-query to keep the 3 interfaces consistent.

Finally, all 3 endpoints now support max_docs in both body and URL.

Relates #24344
2019-06-06 16:01:24 +02:00
James Rodewig cb527c2ece
[DOCS] Rewrite terms query (#42889) 2019-06-06 08:32:42 -04:00
David Roberts b3a778093c
[ML] Add earliest and latest timestamps to field stats (#42890)
This change adds the earliest and latest timestamps into
the field stats for fields of type "date" in the output of
the ML find_file_structure endpoint.  This will enable the
cards for date fields in the file data visualizer in the UI
to be made to look more similar to the cards for date
fields in the index data visualizer in the UI.
2019-06-06 08:56:57 +01:00
Christoph Büscher ffc5534584
[Docs] Clarify caveats for phonetic filters replace option (#42807)
The `replace` option in the phonetic token filter can have suprising side
effects, e.g. such as described in #26921. This PR adds a note to be mindful
about such scenarios and offers alternatives to using the `replace` option.

Closes #26921
2019-06-05 22:02:17 +02:00
Lisa Cawley 60c8fc153a
[DOCS] Adds discovery.type (#42823)
Co-Authored-By: David Turner <david.turner@elastic.co>
2019-06-05 12:29:40 -07:00
Gordon Brown eaa3f874b6
Add custom metadata to snapshots (#41281)
Adds a metadata field to snapshots which can be used to store arbitrary
key-value information. This may be useful for attaching a description of
why a snapshot was taken, tagging snapshots to make categorization
easier, or identifying the source of automatically-created snapshots.
2019-06-05 10:55:07 -06:00
Colin Goodheart-Smithe 795fa816d9
Removes type from TermVectors APIs (#42198) 2019-06-05 09:32:48 +01:00
Jason Tedor 6a98eebeef
Replicate aliases in cross-cluster replication (#41815)
This commit adds functionality so that aliases that are manipulated on
leader indices are replicated by the shard follow tasks to the follower
indices. Note that we ignore write indices. This is due to the fact that
follower indices do not receive direct writes so the concept is not
useful.
2019-06-04 16:44:14 -04:00
James Rodewig b37c3bd0d5 [DOCS] Fix typo in bucket script aggregation link 2019-06-04 09:40:21 -04:00
James Rodewig 1cd60fb290 [DOCS] Fix broken bucket script agg link 2019-06-04 08:43:15 -04:00