Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added include_named_queries_score param in Search API and primary_only in Forcemerge API #203

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion model/_global/search/structures.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ structure Search_QueryParams {
rest_total_hits_as_int: RestTotalHitsAsInt,

@httpQuery("search_pipeline")
search_pipeline: SearchPipeline
search_pipeline: SearchPipeline,

@httpQuery("include_named_queries_score")
@default(false)
include_named_queries_score: IncludeNamedQueriesScore
}

@documentation("The search definition using the Query DSL")
Expand Down
6 changes: 6 additions & 0 deletions model/common_booleans.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ boolean IncludeDefaults
@documentation("Return information about disk usage and shard sizes.")
boolean IncludeDiskInfo

@documentation("Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)")
boolean IncludeNamedQueriesScore

@documentation("Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).")
boolean IncludeSegmentFileSizes

Expand Down Expand Up @@ -131,6 +134,9 @@ boolean PreserveExisting
@documentation("Set to true to return stats only for primary shards.")
boolean Pri

@documentation("Specify whether the operation should only perform on primary shards. Defaults to false.")
boolean PrimaryOnly

@documentation("Specify whether to profile the query execution.")
boolean Profile

Expand Down
4 changes: 4 additions & 0 deletions model/indices/forcemerge/structures.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ structure IndicesForcemerge_QueryParams {
@default(true)
flush: Flush,

@httpQuery("primary_only")
@default(false)
primary_only: PrimaryOnly,

@httpQuery("ignore_unavailable")
ignore_unavailable: IgnoreUnavailable,

Expand Down
4 changes: 2 additions & 2 deletions model/knn/stats/operations.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ operation KNNStats {
@xVersionAdded("1.0")
@readonly
@suppress(["HttpUriConflict"])
@http(method: "GET", uri: "/_plugins/_knn/{nodeId}/stats")
@http(method: "GET", uri: "/_plugins/_knn/{node_id}/stats")
@documentation("Provides information about the current status of the k-NN plugin.")
operation KNNStats_WithNodeId {
input: KNNStats_WithNodeId_Input,
Expand All @@ -48,7 +48,7 @@ operation KNNStats_WithStat {
@xVersionAdded("1.0")
@readonly
@suppress(["HttpUriConflict"])
@http(method: "GET", uri: "/_plugins/_knn/{nodeId}/stats/{stat}")
@http(method: "GET", uri: "/_plugins/_knn/{node_id}/stats/{stat}")
@documentation("Provides information about the current status of the k-NN plugin.")
operation KNNStats_WithStatNodeId {
input: KNNStats_WithStatNodeId_Input,
Expand Down
4 changes: 2 additions & 2 deletions model/knn/stats/structures.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ structure KNNStats_Input with [KNNStats_QueryParams] {
structure KNNStats_WithNodeId_Input with [KNNStats_QueryParams] {
@required
@httpLabel
nodeId: PathNodeId,
node_id: PathNodeId,
}

@input
Expand All @@ -35,7 +35,7 @@ structure KNNStats_WithStat_Input with [KNNStats_QueryParams] {
structure KNNStats_WithStatNodeId_Input with [KNNStats_QueryParams] {
@required
@httpLabel
nodeId: PathNodeId,
node_id: PathNodeId,

@required
@httpLabel
Expand Down
Loading