Skip to content

Commit

Permalink
Merge pull request #78 from dbmi-pitt/karlburke/bumpUpParamSeachSize
Browse files Browse the repository at this point in the history
Limit parameterized searching to 500 results for now.
  • Loading branch information
yuanzhou authored Aug 27, 2024
2 parents ce1a809 + 5c92fd2 commit f7b1be5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,11 @@ def _close_scroll(self, scroll_id, oss_base_url):
# For initial implementation, only support exact match which "ands" each parameter in a "must" List.
# More complex queries should continue to be done submitting a JSON payload with
# a QDSL query to the search endpoint.
def _form_query_from_parameters(self, entity_type):
def _form_query_from_parameters(self, entity_type, query_from=0, query_size=500):

json_dict_exact_match_entity_attrib = {}
json_dict_exact_match_entity_attrib['from'] = query_from
json_dict_exact_match_entity_attrib['size'] = query_size
json_dict_exact_match_entity_attrib['query'] = {}
json_dict_exact_match_entity_attrib['query']['bool'] = {}
json_dict_exact_match_entity_attrib['query']['bool']['must'] = []
Expand Down

0 comments on commit f7b1be5

Please sign in to comment.