FHIR icon indicating copy to clipboard operation
FHIR copied to clipboard

Support `sort=none` on the search API

Open lmsurpre opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. As part of https://github.com/IBM/FHIR/issues/2026 we added support for thee sort options in the history api:

  • _lastUpdated
  • -_lastUpdated
  • none

The 'none' option is interesting because it gives us a neat way to sort via the primary key in the db which has some nice benefits for performance and paging consistency.

Describe the solution you'd like Add support for sort=none on the search API.

Describe alternatives you've considered

Acceptance Criteria

  1. GIVEN [a precondition] AND [another precondition] WHEN [test step] AND [test step] THEN [verification step] AND [verification step]

Additional context if this goes well, I'd possibly even consider it to become the default sort...

lmsurpre avatar Mar 16 '22 18:03 lmsurpre

This could be a good opportunity to add a new search paging mechanism without breaking the existing behavior. Options: A. do paging similar to our history API (with afterHistoryId=123 instead of _page=2 and only going forward in time) B. write out all the resource ids that match the query at a given point in time (up to some limit)

lmsurpre avatar Aug 23 '22 13:08 lmsurpre