Skip to content

Backport: make data streams in APIs resolvable.#55337

Merged
martijnvg merged 3 commits intoelastic:7.xfrom
martijnvg:backport_54726
Apr 17, 2020
Merged

Backport: make data streams in APIs resolvable.#55337
martijnvg merged 3 commits intoelastic:7.xfrom
martijnvg:backport_54726

Conversation

@martijnvg
Copy link
Copy Markdown
Member

Backport from: #54726

The INCLUDE_DATA_STREAMS indices option controls whether data streams can be resolved in an api for both concrete names and wildcard expressions. If data streams cannot be resolved then a 400 error is returned indicating that data streams cannot be used.

In this pr, the INCLUDE_DATA_STREAMS indices option is enabled in the following APIs: search, msearch, refresh, index (op_type create only) and bulk (index requests with op type create only). In a subsequent later change, we will determine which other APIs need to be able to resolve data streams and enable the INCLUDE_DATA_STREAMS indices option for these APIs.

Whether an api resolve all backing indices of a data stream or the latest index of a data stream (write index) depends on the IndexNameExpressionResolver.Context.isResolveToWriteIndex().
If isResolveToWriteIndex() returns true then data streams resolve to the latest index (for example: index api) and otherwise a data stream resolves to all backing indices of a data stream (for example: search api).

Relates to #53100

The INCLUDE_DATA_STREAMS indices option controls whether data streams can be resolved in an api for both concrete names and wildcard expressions. If data streams cannot be resolved then a 400 error is returned indicating that data streams cannot be used.

In this pr, the INCLUDE_DATA_STREAMS indices option is enabled in the following APIs: search, msearch, refresh, index (op_type create only) and bulk (index requests with op type create only). In a subsequent later change, we will determine which other APIs need to be able to resolve data streams and enable the INCLUDE_DATA_STREAMS indices option for these APIs.

Whether an api resolve all backing indices of a data stream or the latest index of a data stream (write index) depends on the IndexNameExpressionResolver.Context.isResolveToWriteIndex().
If isResolveToWriteIndex() returns true then data streams resolve to the latest index (for example: index api) and otherwise a data stream resolves to all backing indices of a data stream (for example: search api).

Relates to elastic#53100
@martijnvg martijnvg added backport :StorageEngine/Data streams Data streams and their lifecycles v7.8.0 labels Apr 16, 2020
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Data streams)

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Apr 17, 2020
@martijnvg martijnvg merged commit 417d5f2 into elastic:7.x Apr 17, 2020
martijnvg added a commit that referenced this pull request Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :StorageEngine/Data streams Data streams and their lifecycles v7.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants