File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11from c2corg_api .search .mapping_types import meta_param_keys
22from c2corg_api .search .search_filters import build_query
3- from c2corg_api .views .document import ES_MAX_RESULT_WINDOW
3+
4+ # the chunk size for each elastic search request
5+ # should be <= ES_MAX_RESULT_WINDOW
6+ CHUNK_SIZE = 10000
47
58
69def get_search_documents (url_params , meta_params , doc_type ):
@@ -91,8 +94,8 @@ def chunk_ids(ids_set):
9194 chunk size is ES_MAX_RESULT_WINDOW
9295 """
9396 ids_list = list (ids_set )
94- for i in range (0 , len (ids_list ), ES_MAX_RESULT_WINDOW ):
95- yield ids_list [i :i + ES_MAX_RESULT_WINDOW ]
97+ for i in range (0 , len (ids_list ), CHUNK_SIZE ):
98+ yield ids_list [i :i + CHUNK_SIZE ]
9699
97100
98101def contains_search_params (url_params ):
You can’t perform that action at this time.
0 commit comments