arXiv / arxiv-search

arXiv Search UI & APIs
https://arxiv.github.io/arxiv-search/
MIT License
96 stars 15 forks source link

Fix the ordering issue for the classical API #266

Closed alefnula closed 4 years ago

alefnula commented 4 years ago

At the moment the order in which the api gives back items is unpredictable even if we set the sortBy fields.

We need to:

  1. Define the default sortBy key when the user doesn't provided. (I think submitted_date is a valid candidate). @mhl10
  2. Fix the ordering issue.
alefnula commented 4 years ago

Now that I browsed the code nothing handles the sortBy and sortOrder query parameters. They are completely ignored in the old API and in the new API. Do you have any documentation on the new API so I can fix it in both places at once?

alefnula commented 4 years ago

Also I'll need a list of fields that you allow in the sortBy query to be able to validate before I send it to elastic search.

mhl10 commented 4 years ago

We need to:

  1. Define the default sortBy key when the user doesn't provided. (I think submitted_date is a valid candidate). @mhl10

Let's go with descending relevance for now.

mhl10 commented 4 years ago

Also I'll need a list of fields that you allow in the sortBy query to be able to validate before I send it to elastic search.

These can just be relevance, lastUpdatedDate, and submittedDate.