Allow providing filter-lang to search #128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The user can optionally provide a filter-lang parameter to the
ItemSearch endpoint when using filter. This preserves the existing
behavior of defaulting to
cql-json
when no value is provided, so itshould be backwards compatible with existing code. By optionally
providing a new value, such as
cql2-json
, the user can supply filterswith different JSON language variants.
This change minimally anticipates the forthcoming STAC-API beta release
of the filter fragment while preserving existing behavior. After the CQL2
changes are released in the next beta, it's likely we'll need a larger refactor
around supporting cql2-text, new conformance classes, etc. In the meantime,
this change will allow Planetary Computer users run cql2-json filters which are
supported in our pgstac implementation.
PR Checklist: