mediacloud / news-search-api

Internal API server that offers search access to the Media Cloud Online News Archive (in Elasticsearch).
https://mediacloud.org
GNU Affero General Public License v3.0
1 stars 3 forks source link

Add new paging tests, more detailed sort instructions #49

Closed rahulbot closed 8 months ago

rahulbot commented 8 months ago

This inserts more randomized fixtures, and adds a new test_paging_all method that verifies that paging through all of them works. In addition, these changes add more detailed sorting instructions (just to be sure it is doing it right as per docs).

The weird thing is that when I count stories and then page through them all, I don't get the exact number back. This inserts 5103, and the total count returns that same value. However when I try to page through them all I only get 5081 results back (over 6 pages). That said, it is paging through almost all the stories and not returning a 404 anywhere.

rahulbot commented 8 months ago

(merging to keep integration testing moving forward, despite lack of reviews)