Skip to content

add query vs. filter language #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,22 @@
- [Features](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/ogcapi-features)
- [Item Search](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/item-search)

The `query` parameter adds additional filters for searching on the properties of Item objects. The JSON syntax for
The Query Extension adds a `query` parameter that allows additional filtering based on the properties of Item objects. The JSON syntax for
these filters is known as "STACQL" (pronounced `stack-cue-el`).

The syntax for the `query` filter is:
It is recommended to implement the [Filter Extension](https://github.com/stac-api-extensions/filter)
instead of the Query Extension. Filter Extension is more well-defined, more expressive, and
uses the standardized CQL2 query language instead of the proprietary language defined here.
There is no plan to deprecate this extension, but it is also unlikely to see any further
refinement or changes.

```js
The extension can be applied to either the **STAC API - Item Search** endpoint `/search`
(advertised with the conformance class <https://api.stacspec.org/v1.0.0-rc.1/item-search#query>) or to the
**STAC API - Features** endpoint `/collections/{collection_id}/items` (advertised with the conformance class <https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features#query>)

The syntax for the `query` parameter is:

```json
{
"query": {
"<property_name>": {
Expand Down