ebsco / edsapi-ruby

A Ruby interface to the EBSCO Discovery Services API
MIT License
7 stars 10 forks source link

Solr start/rows parameters not being mapped correctly to PageNumber/ResultsPerPage #48

Closed drh-stanford closed 7 years ago

drh-stanford commented 7 years ago

The mapping of the start and rows parameters to RetrievalCriteria isn't correct. See https://github.com/ebsco/edsapi-ruby/blob/master/lib/ebsco/eds/options.rb#L438-L452

Solr expects start to be the first hit (0-based) and rows to be the size of the window. So, in other words:

So, AFAICT, the simple case works fine:

BUT,

Does this make sense? Am I missing something?

drh-stanford commented 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

drh-stanford commented 7 years ago

given how we construct our search requests, i don't think this is an issue anymore