Skip to content

Add sortables and collection search #7 #12

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add sortables and collection search #7 #12

wants to merge 2 commits into from

Conversation

m-mohr
Copy link
Contributor

@m-mohr m-mohr commented May 9, 2025

Related Issue(s): #7

Proposed Changes:

  1. Add support for sortables based on OGC API - Features - Part 5: Schemas
  2. Add the details about how to make sort available for collections / collection search.

All changes are purely additive, no changes to existing implementations are required unless sortables are implemented.

PR Checklist:

  • This PR has no breaking changes.
  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@m-mohr m-mohr linked an issue May 9, 2025 that may be closed by this pull request
Comment on lines +33 to +34
Implementers may choose to require fields in Item Properties to be prefixed with `properties.` or not,
or support use of both the prefixed and non-prefixed name, e.g., `properties.datetime` or `datetime`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Higher-level question, is there any way to indicate whether a given client does "implicit prefixes" or not? I've found that, from the "client" perspective, it can be hard to know whether I should prefix with properties or not (pgstac just added support for both in December: https://github.com/stac-utils/pgstac/pull/329/files#diff-2274efb3ca918a5fdd73a71e90b8bbd97b180963ea131085df5aa0195455c5d6R129).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not that I'm aware of, but wouldn't you express that in the property names?

Your properties may be either:

  • properties.datetime
  • properties.title
  • ...

or:

  • datetime
  • title
  • ...

The client should anyway only offer those that are in the list of properties, so it's pretty irrelevant whether they have prefixes or not.

Copy link
Member

@gadomski gadomski May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client should anyway only offer those that are in the list of properties, so it's pretty irrelevant whether they have prefixes or not.

I guess this problem will be at least partially solved by sortables, since it will give services a way to say "please ask for sorting this way". Before sortables it was guess-and-check.

Copy link
Contributor Author

@m-mohr m-mohr May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is meant to be solved by sortables. For cases where sortables is not available, it's still as it was before. This PR is meant to be additive, not change any existing behaviour for APIs that did implement the previous version. I'd think this should be a separate PR then.

Co-authored-by: Pete Gadomski <[email protected]>
@m-mohr m-mohr requested review from gadomski and emmanuelmathot May 12, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for /sortable endpoint
3 participants