stac-rs icon indicating copy to clipboard operation
stac-rs copied to clipboard

Add ability to compare/sort/merge items using a sortby config

Open bitner opened this issue 2 weeks ago • 0 comments

Description

Creates an ItemComparator that implements compare.Compare that can be built using a json sortby config.

This can be used to compare items (returning Ordering) or to sort an array of items.

There is also a function that can be used to merge and interleave multiple streams of sorted items with this config (with an eye towards federated search or similar processing of multiple streams of items).

Checklist

Delete any checklist items that do not apply (e.g. if your change is minor, it may not require documentation updates).

  • [x] Unit tests
  • [x] Documentation, including doctests
  • [x] Git history is linear
  • [x] Commit messages are descriptive
  • [ ] (optional) Git commit messages follow conventional commits
  • [x] Code is formatted (cargo fmt)
  • [x] cargo test
  • [x] Changes are added to the CHANGELOG

bitner avatar Nov 20 '25 17:11 bitner