28
28
from stac_fastapi .core .route_dependencies import get_route_dependencies
29
29
from stac_fastapi .core .utilities import get_bool_env
30
30
from stac_fastapi .sfeos_helpers .aggregation import EsAsyncBaseAggregationClient
31
+ from stac_fastapi .sfeos_helpers .filter import EsAsyncBaseFiltersClient
31
32
32
33
if os .getenv ("BACKEND" , "elasticsearch" ).lower () == "opensearch" :
33
34
from stac_fastapi .opensearch .config import AsyncOpensearchSettings as AsyncSettings
39
40
)
40
41
else :
41
42
from stac_fastapi .elasticsearch .config import (
42
- ElasticsearchSettings as SearchSettings ,
43
43
AsyncElasticsearchSettings as AsyncSettings ,
44
44
)
45
+ from stac_fastapi .elasticsearch .config import (
46
+ ElasticsearchSettings as SearchSettings ,
47
+ )
45
48
from stac_fastapi .elasticsearch .database_logic import (
46
49
DatabaseLogic ,
47
50
create_collection_index ,
@@ -198,6 +201,13 @@ def bulk_txn_client():
198
201
async def app ():
199
202
settings = AsyncSettings ()
200
203
204
+ filter_extension = FilterExtension (
205
+ client = EsAsyncBaseFiltersClient (database = database )
206
+ )
207
+ filter_extension .conformance_classes .append (
208
+ "http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators"
209
+ )
210
+
201
211
aggregation_extension = AggregationExtension (
202
212
client = EsAsyncBaseAggregationClient (
203
213
database = database , session = None , settings = settings
@@ -217,7 +227,7 @@ async def app():
217
227
FieldsExtension (),
218
228
QueryExtension (),
219
229
TokenPaginationExtension (),
220
- FilterExtension () ,
230
+ filter_extension ,
221
231
FreeTextExtension (),
222
232
]
223
233
@@ -313,7 +323,6 @@ async def app_client_rate_limit(app_rate_limit):
313
323
314
324
@pytest_asyncio .fixture (scope = "session" )
315
325
async def app_basic_auth ():
316
-
317
326
stac_fastapi_route_dependencies = """[
318
327
{
319
328
"routes":[{"method":"*","path":"*"}],
0 commit comments