Skip to content

Commit

Permalink
Add overlay for query in async search and search API
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Sep 20, 2024
1 parent cd0d063 commit 2c28eaf
Showing 1 changed file with 47 additions and 7 deletions.
54 changes: 47 additions & 7 deletions docs/overlays/elasticsearch-shared-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ actions:
- target: "$.components['schemas']['ml._types:Datafeed'].properties.query"
description: Remove query object from anomaly detection datafeed
remove: true
- target: "$.components['schemas']['ml._types:DatafeedConfig'].properties.query"
description: Remove query object from anomaly detection datafeed configuration
remove: true
- target: "$.components['schemas']['ml._types:DatafeedConfig'].properties"
description: Re-add a simplified query object in anomaly detection datafeed configuration
- target: "$.components['schemas']['ml._types:Datafeed'].properties"
description: Re-add a simplified query object in anomaly detection datafeed
update:
query:
x-abbreviated: true
Expand All @@ -65,8 +62,11 @@ actions:
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
- target: "$.components['schemas']['ml._types:Datafeed'].properties"
description: Re-add a simplified query object in anomaly detection datafeed
- target: "$.components['schemas']['ml._types:DatafeedConfig'].properties.query"
description: Remove query object from anomaly detection datafeed configuration
remove: true
- target: "$.components['schemas']['ml._types:DatafeedConfig'].properties"
description: Re-add a simplified query object in anomaly detection datafeed configuration
update:
query:
x-abbreviated: true
Expand Down Expand Up @@ -133,6 +133,7 @@ actions:
description: Query DSL
- target: "$.components['requestBodies']['graph.explore'].content['application/json'].schema.properties.query"
description: Remove query object from graph explore operation
remove: true
- target: "$.components['requestBodies']['graph.explore'].content['application/json'].schema.properties"
description: "Re-add simplified query object in graph explore operation"
update:
Expand All @@ -142,8 +143,12 @@ actions:
description: >
A seed query that identifies the documents of interest.
Can be any valid Elasticsearch query.
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
- target: "$.components['schemas']['graph._types:Hop'].properties.query"
description: Remove query object from graph explore connections schema
remove: true
- target: "$.components['schemas']['graph._types:Hop'].properties"
description: "Re-add simplified query object in graph explore connections schema"
update:
Expand All @@ -153,8 +158,12 @@ actions:
description: >
An optional guiding query that constrains the Graph API as it explores connected terms.
For example, you might want to direct the Graph API to ignore older data by specifying a query that identifies recent documents.
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
- target: "$.components['schemas']['_global.scripts_painless_execute:PainlessContextSetup'].properties.query"
description: Remove query object from painless script context setup schema
remove: true
- target: "$.components['schemas']['_global.scripts_painless_execute:PainlessContextSetup'].properties"
description: "Re-add simplified query object in painless script context setup schema"
update:
Expand All @@ -165,6 +174,37 @@ actions:
This property applies only when `score` is specified as the script `context`.
Use this property to specify a query for computing a score.
Besides deciding whether or not the document matches, the query clause also calculates a relevance score in the `_score` metadata field.
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
- target: "$.components['requestBodies']['async_search.submit'].content['application/json'].schema.properties.query"
description: Remove query object from asynch search request
remove: true
- target: "$.components['requestBodies']['async_search.submit'].content['application/json'].schema.properties"
description: "Re-add simplified query object in asynch search request"
update:
query:
x-abbreviated: true
type: object
description: >
Defines the search definition using the Query DSL.
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
- target: "$.components['requestBodies']['search'].content['application/json'].schema.properties.query"
description: Remove query object from search request
remove: true
- target: "$.components['requestBodies']['search'].content['application/json'].schema.properties"
description: "Re-add simplified query object in search request"
update:
query:
x-abbreviated: true
type: object
description: >
Defines the search definition using the Query DSL.
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
# Examples
- target: "$.components['requestBodies']['async_search.submit']"
description: "Add example for asynch search submit request"
Expand Down

0 comments on commit 2c28eaf

Please sign in to comment.