Skip to content

How to sort search serults #321

Answered by StijnCaerts
piust asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @piust, I had a look at your example and there are a few things that might need to be fixed:

  • properties.published is not a default field in STAC. You can take a look at the created/updated field
  • the sortby field should be an array of sort keys

I modified your example into a working query with sorting:

{
  "filter": {
    "op": "and",
    "args": [
      {
        "op": "and",
        "args": [
          {
            "op": "=",
            "args": [
              {
                "property": "properties.constellation"
              },
              "sentinel-2"
            ]
          }
        ]
      },
      {
        "op": ">=",
        "args": [
          {
            "property"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by piust
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants