Skip to content

Commit 812239b

Browse files
committed
Make sure search_type=count works
1 parent 1b2fa6c commit 812239b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test_elasticsearch_dsl/test_integration/test_count.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ def test_count_filter(data_client):
1313
# initial commit + repo document
1414
assert 2 == s.count()
1515

16+
def test_search_type_count(data_client):
17+
s = Search(using=data_client, index='git')
18+
s.aggs.bucket('per_type', 'terms', field='_type')
19+
s = s.params(search_type='count')
20+
result = s.execute()
21+
22+
assert [] == result.hits
23+
assert 2 == len(result.aggregations.per_type.buckets)
24+

0 commit comments

Comments
 (0)