Commit graph

272 commits

Author SHA1 Message Date
James Rodewig
effb6502d7
[DOCS] Separate add index alias API docs (#46086) 2019-08-29 10:38:48 -04:00
Zachary Tong
bf71108ab3
Rename data-science plugin to analytics (#46092)
This renames the "data-science" plugin to "analytics".
Also removes the enabled flag
2019-08-29 10:34:17 -04:00
James Rodewig
947fccbda3
[DOCS] Add get index alias API docs (#46046) 2019-08-29 09:44:58 -04:00
debadair
2dcdbc90f2
[DOCS] Reformats delete by query API (#46051)
* Reformats delete by query API

* Update docs/reference/docs/delete-by-query.asciidoc

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

* Updated common parms includes.
2019-08-28 19:33:50 -07:00
István Zoltán Szabó
6ba13e9ec3 [DOCS] Adds search-related query parameters to the common parameters. (#46057)
@szabosteve Merging so I can make some additions. Will incorporate the comments from @jrodewig.
2019-08-28 16:44:22 -07:00
Zachary Tong
273c35f79c
Add Cumulative Cardinality agg (and Data Science plugin) (#43661)
This adds a pipeline aggregation that calculates the cumulative
cardinality of a field.  It does this by iteratively merging in the
HLL sketch from consecutive buckets and emitting the cardinality up
to that point.

This is useful for things like finding the total "new" users that have
visited a website (as opposed to "repeat" visitors).

This is a Basic+ aggregation and adds a new Data Science plugin
to house it and future advanced analytics/data science aggregations.
2019-08-26 10:43:24 -04:00
James Rodewig
fbecbcf70c
[DOCS] Reformat create index API docs (#45749) 2019-08-26 08:31:31 -04:00
James Rodewig
ad8eb03295
[DOCS] Relocate Ingest API docs to REST API section (#45812) 2019-08-23 11:54:40 -04:00
James Rodewig
4e70b379e4
[DOCS] Reformat get index API docs (#45758) 2019-08-23 11:14:51 -04:00
James Rodewig
46d7849032
Change {var} convention to <var> (#45904) 2019-08-23 10:57:20 -04:00
James Rodewig
00b7dc1950
[DOCS] Reformat get mapping API. Reformat and reuse multi-index params. (#45699) 2019-08-21 09:42:10 -04:00
debadair
9f094d6ecd
[DOCS] Reformat doc delete API reference. (#45422)
* [DOCS] Reformat doc delete API reference.
2019-08-13 09:54:04 -07:00
debadair
009020f569
[DOCS] Reformat index API. (#45415)
* [DOCS] Reformat index API.

* Incorporated review feedback.
2019-08-12 14:50:15 -07:00
István Zoltán Szabó
3830e53f28
[DOCS] Reformats cluster stats API and expands common params (#45270)
Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-08-07 16:46:39 +02:00
James Rodewig
b010fa8835
[DOCS] Reformats cat nodeattrs API (#45255) 2019-08-07 09:31:07 -04:00
James Rodewig
56a380b1a8
[DOCS] Reformats cat indices API (#45239) 2019-08-07 09:08:09 -04:00
James Rodewig
5bf58c279d
[DOCS] Reformat cat count API (#45160) 2019-08-06 08:36:22 -04:00
James Rodewig
4a81606147
[DOCS] Reformats cat allocation API (#45158) 2019-08-05 11:17:37 -04:00
James Rodewig
bc83df1bff
[DOCS] Reformat cat alias API (#45119) 2019-08-05 08:27:15 -04:00
James Rodewig
a9700eee37
[DOCS] Create common parameters file for REST APIs (#45117) 2019-08-02 08:42:33 -04:00
István Zoltán Szabó
b08278ef2a
[DOCS] Amends REST API TOC. (#44948) 2019-07-29 14:06:17 +02: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
Lisa Cawley
9413f97c1f
[DOCS] Reformat info and deprecation APIs to use new API format (#44599) 2019-07-18 16:10:22 -07: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
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
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
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
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
562d609c45 [DOCS] Relocate several APIs to REST APIs section (#44238) 2019-07-12 12:15:01 -04: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
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
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
f787c3bddf
[DOCS] Reformat freeze unfreeze APis to use new API format (#43948) 2019-07-08 08:56:30 -07: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
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
James Rodewig
1594892312
[DOCS] Change 'X-Pack APIs' section to 'REST APIs' (#43451) 2019-06-26 13:44:33 -04: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
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
Mayya Sharipova
952ddf247a
Move dense_vector and sparse_vector to module (#43280) 2019-06-18 08:15:46 -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
Benjamin Trent
2d23399bd2
[ML] [Data Frame] Adding supported aggs in docs (#42728)
* [ML] [Data Frame] Adding supported aggs in docs

* [DOCS] Moves pivot to definitions list
2019-06-04 07:01:19 -05:00
David Kyle
2864e9895a
[ML DataFrame] Update Preview docs for source config change (#41761) 2019-05-03 16:30:41 +01:00
Lisa Cawley
e7f9c73d10
[DOCS] Adds placeholder for data frame preview API (#40232) 2019-03-20 10:19:41 -07:00
Lisa Cawley
43065ea536
[DOCS] Replaces CCR terms with attributes (#39516) 2019-03-12 14:27:17 -07:00
Hendrik Muhs
869de3f160
Add data frame feature (#38934)
The data frame plugin allows users to create feature indexes by pivoting a source index. In a
nutshell this can be understood as reindex supporting aggregations or similar to the so called entity
centric indexing.

Full history is provided in: feature/data-frame-transforms
2019-02-18 09:16:38 +01:00
Martijn van Groningen
f51bc00fcf
Added ccr to xpack usage infrastructure (#37256)
* Added ccr to xpack usage infrastructure

Closes #37221
2019-01-30 07:58:26 +01:00