Skip to content

The query attribute on the EnrichPolicy should be QueryDslQueryContainer | QueryDslQueryContainer[] not string #2074

@simianhacker

Description

@simianhacker

🐛 Bug Report

The query attribute on the EnrichPolicy type is set to string, it should be set to QueryDslQueryContainer | QueryDslQueryContainer[]. This causes problems when working with any of the Enrich APIs or mocking the APIs for testing.

export interface EnrichPolicy {
enrich_fields: Fields
indices: Indices
match_field: Field
query?: string
name?: Name
elasticsearch_version?: string
}

Expected behavior

When using a DSL for the query, I shouldn't get a Typescript error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions