File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
stac_fastapi/opensearch/stac_fastapi/opensearch Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 65
65
logger = logging .getLogger (__name__ )
66
66
ES_MAX_URL_LENGTH = 4096
67
67
68
+
68
69
async def create_index_templates () -> None :
69
70
"""
70
71
Create index templates for the Collection and Item indices.
@@ -546,15 +547,15 @@ async def execute_search(
546
547
547
548
index_param = indices (collection_ids )
548
549
549
- if len (index_param ) > ES_MAX_URL_LENGTH - 300 :
550
+ if len (index_param ) > ES_MAX_URL_LENGTH - 300 :
550
551
index_param = ITEM_INDICES
551
552
index_filter = {"terms" : {"collection" : collection_ids }}
552
- if not "bool" in search_body ["query" ]:
553
+ if "bool" not in search_body ["query" ]:
553
554
search_body ["query" ]["bool" ] = {}
554
- if not "filter" in search_body ["query" ]["bool" ]:
555
+ if "filter" not in search_body ["query" ]["bool" ]:
555
556
search_body ["query" ]["bool" ]["filter" ] = [index_filter ]
556
557
filters = search_body ["query" ]["bool" ]["filter" ]
557
- if not index_filter in filters :
558
+ if index_filter not in filters :
558
559
filters .append (index_filter )
559
560
560
561
max_result_window = MAX_LIMIT
You can’t perform that action at this time.
0 commit comments