Skip to content
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

Sorting #12

Open
kinlane opened this issue Apr 14, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@kinlane
Copy link
Contributor

commented Apr 14, 2017

How will we be sorting information. There is no sorting capability in the current design.

@NeilMcKechnie

This comment has been minimized.

Copy link

commented Aug 10, 2017

We need at least Alphabetical and Proximity (if a search reference location is included). A third option is Relevance which opens a big can of worms about how relevance is calculated. We could just keep that can closed for now though, leave it as a sorting option, and let each implementer decide how to calculate and sort via Relevance.

@timgdavies

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2017

A last-updated (descending) sort will be important for synchronisation use-cases.

@kinlane

This comment has been minimized.

Copy link
Contributor Author

commented Sep 1, 2017

Suggesting we run with

sortby ([fieldname],last-updated)
order (asc,desc)

leaving proximity for futue release, and possibility limited to HSDA search.

combinging simplicity, best practices, and above feedback.

@kinlane kinlane added v1.2 hsda labels Sep 1, 2017

@timgdavies

This comment has been minimized.

Copy link
Contributor

commented Sep 13, 2017

Would this only allow sorting by fields in the top resource? Or would we allow a syntax of field paths to access sub-resources in the /full / /complete representations (or even when /complete is not requested)?

For example, I might want to search for organizations, but sort the results based on thee funding source of their services.

Could this be expressed as:

?sortby=organizations/services/funding/source&order=asc

@kinlane

This comment has been minimized.

Copy link
Contributor Author

commented Sep 14, 2017

with this release I kept just top level. Plan is to go next level with next release. Trying to minimize the change. Thanks for brining up!

@rasmus-storjohann-PG

This comment has been minimized.

Copy link

commented Jan 23, 2018

A possible alternative to the order parameter is an optional - prefix on each of the fields passed to sortby, that way it's possible to sort ascending by one field and descending by another. Not sure if this is functionality that is useful or just making things more complicated.

@kinlane

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2018

@rasmus-storjohann-PG I like that concept. Will be evaluating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.