Skip to content

Commit

Permalink
Added rest_total_hits_as_int param in Search API and primary_only in …
Browse files Browse the repository at this point in the history
…Forcemerge API

Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed Mar 20, 2024
1 parent 23fa274 commit 09d94d4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
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: RestTotalHitsAsInt
}

@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

0 comments on commit 09d94d4

Please sign in to comment.