stac-fastapi
stac-fastapi copied to clipboard
Adding free-text extension.
Related Issue(s):
Description:
Adding the free-text extension
PR Checklist:
- [x]
pre-commit
hooks pass locally - [x] Tests pass (run
make test
) - [ ] Documentation has been updated to reflect changes, if applicable, and docs build successfully (run
make docs
) - [ ] Changes are added to the CHANGELOG.
@m-mohr Could I get your opinion on this I know you've helped with the extension definition.
where are we with this PR? @rhysrevans3
where are we with this PR? @rhysrevans3
We're unsure on if basic and advanced search are compatible https://github.com/stac-api-extensions/freetext-search/issues/10
I think the current options are, update the advanced search to better match with the basic search or separate them into two extensions.
Dear @rhysrevans3 and @m-mohr I've refactored a bit this extension to:
- make the
conformance_classes
a required argument, because some implementation could only support thefree-text
spec in specific endpoints - move the
stac_fastapi.extensions.core
- added
tests
- assume that the param for both GET/POST are of string form (ref: https://github.com/stac-api-extensions/freetext-search/issues/11), I think it's then up to the implementation to parse the parameter
- assume that the param for both GET/POST are of string form
Correct for Advanced, not for Basic. See also https://github.com/stac-api-extensions/freetext-search/issues/11
I guess I'm going to create 2 Extensions to make this a bit more clear
That's a very good idea, especially as they are not quite compliant yet.
There is a draft pr in sfeos related to this but I don't think it gives any new information - https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/227/files
This is ready for review
It would be nice to add documentation but this can be done in another PR ;-)
Was the implementation tested against STAC Browser by any chance?
Was the implementation tested against STAC Browser by any chance?
no, but I don't know any backend supporting the free-text spec 😓
Was the implementation tested against STAC Browser by any chance?
@m-mohr I don't really see how the free-text extension is used by STAC-Browser
maybe https://github.com/radiantearth/stac-browser/blob/108947ebe8cbd64c7e288bbaa3c5f81293706d3e/src/components/SearchFilter.vue#L141 seems to point that q
should be an array 🤷 but then I don't know if it's used in a GET or POST request
I'm going to merge this PR (so I can continue on the collection-search which depends on the free-text ext) but feel free to comment and we could still make changes before we do a next release