lib/elasticsearch/api/actions/search.rb in elasticsearch-api-8.7.1 vs lib/elasticsearch/api/actions/search.rb in elasticsearch-api-8.8.0
- old
+ new
@@ -13,11 +13,11 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-# Auto generated from build hash cf0d0c8ed43ab23b6d73c430a66aca4e771fce20
+# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
#
module Elasticsearch
module API
module Actions
@@ -66,21 +66,20 @@
# @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
# @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
# @option arguments [Number] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
# @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
# @option arguments [String] :min_compatible_shard_node The minimum compatible version that all shards involved in search should have for this request to be successful
+ # @option arguments [Boolean] :include_named_queries_score 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)
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The search definition using the Query DSL
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.7/search-search.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.8/search-search.html
#
def search(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}
- body = arguments.delete(:body)
-
- arguments[:index] = UNDERSCORE_ALL if !arguments[:index] && arguments[:type]
+ body = arguments.delete(:body)
_index = arguments.delete(:index)
method = if body
Elasticsearch::API::HTTP_POST