2828from stac_fastapi .core .route_dependencies import get_route_dependencies
2929from stac_fastapi .core .utilities import get_bool_env
3030from stac_fastapi .sfeos_helpers .aggregation import EsAsyncBaseAggregationClient
31+ from stac_fastapi .sfeos_helpers .filter import EsAsyncBaseFiltersClient
3132
3233if os .getenv ("BACKEND" , "elasticsearch" ).lower () == "opensearch" :
3334 from stac_fastapi .opensearch .config import AsyncOpensearchSettings as AsyncSettings
3940 )
4041else :
4142 from stac_fastapi .elasticsearch .config import (
42- ElasticsearchSettings as SearchSettings ,
4343 AsyncElasticsearchSettings as AsyncSettings ,
4444 )
45+ from stac_fastapi .elasticsearch .config import (
46+ ElasticsearchSettings as SearchSettings ,
47+ )
4548 from stac_fastapi .elasticsearch .database_logic import (
4649 DatabaseLogic ,
4750 create_collection_index ,
@@ -198,6 +201,13 @@ def bulk_txn_client():
198201async def app ():
199202 settings = AsyncSettings ()
200203
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+
201211 aggregation_extension = AggregationExtension (
202212 client = EsAsyncBaseAggregationClient (
203213 database = database , session = None , settings = settings
@@ -217,7 +227,7 @@ async def app():
217227 FieldsExtension (),
218228 QueryExtension (),
219229 TokenPaginationExtension (),
220- FilterExtension () ,
230+ filter_extension ,
221231 FreeTextExtension (),
222232 ]
223233
@@ -313,7 +323,6 @@ async def app_client_rate_limit(app_rate_limit):
313323
314324@pytest_asyncio .fixture (scope = "session" )
315325async def app_basic_auth ():
316-
317326 stac_fastapi_route_dependencies = """[
318327 {
319328 "routes":[{"method":"*","path":"*"}],
0 commit comments