Skip to content

Commit

Permalink
Change max_size to 10 as it is the default size used by ES to return …
Browse files Browse the repository at this point in the history
…document
  • Loading branch information
sengineer0 committed Aug 2, 2022
1 parent e59ab63 commit bf16da0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion biothings/web/query/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def transform(self, response, **options):
if isinstance(response, list):
max_total = 0
count_query_exceed_max_size = 0
max_size = options.size or 1000
# If options.set isn't set, the default number of hits returned by the ES is 10.
# Ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html#search-multi-search-api-request-body # noqa: F501
max_size = options.size or 10

responses_ = []
options.pop('one', None) # ignore
Expand Down

0 comments on commit bf16da0

Please sign in to comment.