Skip to content

Commit

Permalink
[Ingest Manager] Update queries from stream.* to dataset.* (elast…
Browse files Browse the repository at this point in the history
…ic#68322)

Resolves elastic#67672

Part of elastic/package-registry#491

See elastic/package-registry#492 for package registry changes.

Updates existing queries to use `dataset.*` fields. from `stream.*` fields.

I looked at the EPM code paths for asset installation, and did not find anything that would need to be changed based on the above package registry changes. We don't hardcode anything specific for field names. The package information (i.e. [nginx package info](https://epr.elastic.co/package/nginx/0.1.2/)) is not affected by the current package registry changes.
  • Loading branch information
jen-huang committed Jun 9, 2020
1 parent 050f589 commit 9c89854
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export const getListHandler: RequestHandler = async (context, request, response)
must: [
{
exists: {
field: 'stream.namespace',
field: 'dataset.namespace',
},
},
{
exists: {
field: 'stream.dataset',
field: 'dataset.name',
},
},
],
Expand All @@ -54,19 +54,19 @@ export const getListHandler: RequestHandler = async (context, request, response)
aggs: {
dataset: {
terms: {
field: 'stream.dataset',
field: 'dataset.name',
size: 1,
},
},
namespace: {
terms: {
field: 'stream.namespace',
field: 'dataset.namespace',
size: 1,
},
},
type: {
terms: {
field: 'stream.type',
field: 'dataset.type',
size: 1,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ const getIndexQuery = (templateName: string) => ({
must: [
{
exists: {
field: 'stream.namespace',
field: 'dataset.namespace',
},
},
{
exists: {
field: 'stream.dataset',
field: 'dataset.name',
},
},
],
Expand Down

0 comments on commit 9c89854

Please sign in to comment.