NYULibraries / primo-endpoint

Metadata aggregator serving json to populate primo
http://52.204.195.130/
Apache License 2.0
1 stars 1 forks source link

Retrieve FDA records in consistent order #5

Open dylex opened 7 years ago

dylex commented 7 years ago

For all the other sources we use a ?sort=id parameter or something like it to get the records in order. This is important for pagination, but also helpful in testing when comparing the output. Is there something we can pass to the DSpace REST API to sort the items within each collection? Should we just sort them ourselves after the fact? Or just let them be in whatever order?

ekate commented 7 years ago

It appeared REST API doesn't have parameter for sorting items. To get collection items REST API uses a method which simply makes a db query, and then display the results in the order they were returned by db. In DSpace main UI all lists are coming from solr not from db so it's different. Hence we will have to re-oder them ourselves. I think the newest items should come first. I will try to implement it if it's o.k. with you

dylex commented 7 years ago

Ah, well. Sure, go for it. All the other collections sort by id in some way, so I might prefer that, but as long as it's consistent anything's fine.