LD4P / qa_server

A rails engine with questioning authority gem installed to serve as an authority search server with normalized results.
Apache License 2.0
5 stars 2 forks source link

pagination - total_num_found == num_returned #477

Open elrayle opened 2 years ago

elrayle commented 2 years ago

Description

The total_records as reported by the cache should be the total number of results that lucene believes matches the query.

Expected

maxRecords=5 & lucene reports 81 total matches ==> total_records should be 81

Actual

maxRecords=5 & lucene reports 81 total matches ==> total_records is 5

Proposed Solution

The cache will use a 6th query to get an approximation of the total count. The cache will return a number between the number returned and 1000. Pagination will show up in Sinopia if total count > requested.

elrayle commented 2 years ago

@eichmann Plans to work on it this week. Not sure if there will be a performance impact of the approach on large result sets.

Going to try to run a test query that doesn't actually return results.