Skip to content

Commit 82f9cb0

Browse files
Merge branch 'main' into CAT-1522
2 parents 51395ac + a1962b3 commit 82f9cb0

File tree

11 files changed

+50
-13
lines changed

11 files changed

+50
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919

2020
### Updated
2121

22+
## [v6.7.2] - 2025-11-04
23+
24+
### Fixed
25+
26+
- Fixed "list index out of range" error when using BETWEEN operator in CQL2-text filters. [#521](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/521)
27+
2228
## [v6.7.1] - 2025-10-31
2329

2430
### Fixed
@@ -617,7 +623,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
617623
- Use genexp in execute_search and get_all_collections to return results.
618624
- Added db_to_stac serializer to item_collection method in core.py.
619625

620-
[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/compare/v6.7.1...main
626+
[Unreleased]: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/compare/v6.7.2...main
627+
[v6.7.2]: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/compare/v6.7.1...v6.7.2
621628
[v6.7.1]: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/compare/v6.7.0...v6.7.1
622629
[v6.7.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/compare/v6.6.0...v6.7.0
623630
[v6.6.0]: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/compare/v6.5.1...v6.6.0

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ async def post_search(
830830
search = await self.database.apply_cql2_filter(search, cql2_filter)
831831
except Exception as e:
832832
raise HTTPException(
833-
status_code=400, detail=f"Error with cql2_json filter: {e}"
833+
status_code=400, detail=f"Error with cql2 filter: {e}"
834834
)
835835

836836
if hasattr(search_request, "q"):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "6.7.1"
2+
__version__ = "6.7.2"

stac_fastapi/elasticsearch/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ keywords = [
3030
]
3131
dynamic = ["version"]
3232
dependencies = [
33-
"stac-fastapi-core==6.7.1",
34-
"sfeos-helpers==6.7.1",
33+
"stac-fastapi-core==6.7.2",
34+
"sfeos-helpers==6.7.2",
3535
"elasticsearch[async]~=8.19.1",
3636
"uvicorn~=0.23.0",
3737
"starlette>=0.35.0,<0.36.0",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "6.7.1"
2+
__version__ = "6.7.2"

stac_fastapi/opensearch/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ keywords = [
3030
]
3131
dynamic = ["version"]
3232
dependencies = [
33-
"stac-fastapi-core==6.7.1",
34-
"sfeos-helpers==6.7.1",
33+
"stac-fastapi-core==6.7.2",
34+
"sfeos-helpers==6.7.2",
3535
"opensearch-py~=2.8.0",
3636
"opensearch-py[async]~=2.8.0",
3737
"uvicorn~=0.23.0",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "6.7.1"
2+
__version__ = "6.7.2"

stac_fastapi/sfeos_helpers/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ keywords = [
3131
]
3232
dynamic = ["version"]
3333
dependencies = [
34-
"stac-fastapi.core==6.7.1",
34+
"stac-fastapi.core==6.7.2",
3535
]
3636

3737
[project.urls]

stac_fastapi/sfeos_helpers/stac_fastapi/sfeos_helpers/filter/transform.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,19 @@ def to_es(queryables_mapping: Dict[str, Any], query: Dict[str, Any]) -> Dict[str
9292

9393
elif query["op"] == AdvancedComparisonOp.BETWEEN:
9494
field = to_es_field(queryables_mapping, query["args"][0]["property"])
95-
gte, lte = query["args"][1], query["args"][2]
95+
96+
# Handle both formats: [property, [lower, upper]] or [property, lower, upper]
97+
if len(query["args"]) == 2 and isinstance(query["args"][1], list):
98+
# Format: [{'property': '...'}, [lower, upper]]
99+
gte, lte = query["args"][1][0], query["args"][1][1]
100+
elif len(query["args"]) == 3:
101+
# Format: [{'property': '...'}, lower, upper]
102+
gte, lte = query["args"][1], query["args"][2]
103+
else:
104+
raise ValueError(
105+
f"BETWEEN operator expects 2 or 3 args, got {len(query['args'])}"
106+
)
107+
96108
if isinstance(gte, dict) and "timestamp" in gte:
97109
gte = gte["timestamp"]
98110
if isinstance(lte, dict) and "timestamp" in lte:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "6.7.1"
2+
__version__ = "6.7.2"

0 commit comments

Comments
 (0)