OpenSearch/rest-api-spec/test/search/50_search_count.yaml
Adrien Grand a608db122d Search: Remove the count search type.
This commit brings the benefits of the `count` search type to search requests
that have a `size` of 0:
 - a single round-trip to shards (no fetch phase)
 - ability to use the query cache

Since `count` now provides no benefits over `query_then_fetch`, it has been
deprecated.

Close #7630
2015-03-31 11:31:49 +02:00

34 lines
561 B
YAML

---
"search_type=count (deprecated) support":
- do:
indices.create:
index: test
- do:
index:
index: test
type: test
id: 1
body: { foo: bar }
- do:
index:
index: test
type: test
id: 2
body: { foo: bar }
- do:
indices.refresh:
index: [test]
- do:
search:
index: test
search_type: count
body:
query:
match:
foo: bar
- match: {hits.total: 2}