Skip to content

Commit 2279c72

Browse files
Yuri ZmytrakovYuri Zmytrakov
authored andcommitted
chore: update readme and changelog
1 parent 4266ecf commit 2279c72

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Added
1111

12+
- Added CQL2 Abstract Syntax Tree (AST) structure for efficient query parsing and datetime-based indexes. [#560](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/560)
13+
1214
- Environment variable `VALIDATE_QUERYABLES` to enable/disable validation of queryables in search/filter requests. When set to `true`, search requests will be validated against the defined queryables, returning an error for any unsupported fields. Defaults to `false` for backward compatibility.[#532](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/532)
1315

1416
- Environment variable `QUERYABLES_CACHE_TTL` to configure the TTL (in seconds) for caching queryables. Default is `1800` seconds (30 minutes) to balance performance and freshness of queryables data. [#532](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/532)

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ This project is built on the following technologies: STAC, stac-fastapi, FastAPI
100100
- [Examples](#examples)
101101
- [Performance](#performance)
102102
- [Direct Response Mode](#direct-response-mode)
103+
- [CQL2 JSON Search with AST-based Parsing](#cql2-json-search-with-ast-based-parsing)
103104
- [Quick Start](#quick-start)
104105
- [Installation](#installation)
105106
- [Running Locally](#running-locally)
@@ -379,6 +380,31 @@ These examples provide practical reference implementations for various deploymen
379380
- **Default setting**: `false` for safety.
380381
- **More information**: See [issue #347](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/347) for background and implementation details.
381382

383+
384+
### CQL2 JSON Search with AST-based Parsing
385+
386+
SFEOS now uses an Abstract Syntax Tree (AST) in CQL2-JSON search queries for efficient query parsing and datetime extraction, enabling the selection and management of the appropriate searchable indexes.
387+
388+
#### AST-based Query Processing
389+
390+
The CQL2 implementation uses an Abstract Syntax Tree (AST) structure that replaces the previous dictionary-based processing. This enables:
391+
392+
1. **Structured Query Representation**: Queries are parsed into a tree structure with different node types
393+
2. **Efficient Parameter Access**: Easy traversal and extraction of query parameters
394+
3. **Optimized Index Selection**: Selection of appropriate fields for selection and management of indexes
395+
396+
#### AST Node Types
397+
398+
The AST supports various node types representing different query operations:
399+
400+
- **Logical Nodes**: `AND`, `OR`, `NOT` operators for combining conditions
401+
- **Comparison Nodes**: `=`, `<>`, `<`, `<=`, `>`, `>=`, `isNull` operations
402+
- **Advanced Comparison Nodes**: `LIKE`, `BETWEEN`, `IN` operations
403+
- **Spatial Nodes**: `s_intersects`, `s_contains`, `s_within`, `s_disjoint` for geospatial queries
404+
- **Datetime Nodes**: Special handling for datetime range and exact value queries
405+
406+
The AST-based approach enables efficient extraction of datetime parameters (`datetime`, `start_datetime`, `end_datetime`) from complex queries.
407+
382408
## Quick Start
383409

384410
This section helps you get up and running with stac-fastapi-elasticsearch-opensearch quickly.

0 commit comments

Comments
 (0)