Closed drh-stanford closed 7 years ago
As we discussed yesterday, the main thing we're trying to accomplish is an efficient (low latency) way to get the ID values for the previous and next hits relative to a given hit.
So, for example, getting the ID values for the 19th and 21st hit when the user is on the show page for the 20th hit.
We don't necessarly need to preserve the start/rows
parameters, we just need an API call that can implement Blacklight's get_previous_and_next_documents_for_search
method with low latency -- see https://github.com/projectblacklight/blacklight/blob/release-6.x/app/controllers/concerns/blacklight/search_helper.rb#L89-L101
given how we construct our search requests, i don't think this is an issue anymore
The mapping of the
start
androws
parameters to RetrievalCriteria isn't correct. See https://github.com/ebsco/edsapi-ruby/blob/master/lib/ebsco/eds/options.rb#L438-L452Solr expects
start
to be the first hit (0-based) androws
to be the size of the window. So, in other words:start=0 rows=10
means hits 1..10start=10 rows=10
means hits 11..20start=4 rows=3
means hits 5..8So, AFAICT, the simple case works fine:
start=0 rows=10
maps toPageNumber=1 ResultsPerPage=10
for hits 1..10BUT,
start=10 rows=10
maps toPageNumber=11 ResultsPerPage=10
which is 111..120start=4 rows=3
maps toPageNumber=5 ResultsPerPage=3
which is 16..18Does this make sense? Am I missing something?