Jarn/collective.solr — Issue #11: Orphan parameter in Batch() hides results
Author: reinhardt
Created: 2012-02-02 17:57:50+00:00
State: open

When `Batch()` is called with _orphan=n_ (e.g. _orphan=1_ in search.pt) and the query yields n more results than a multiple of _b_size_, the n results are effectively hidden. Batch tries to integrate the last n results into the last but one batch page, but since collective.solr only gets _b_start_ and _b_size_ and does not know about the _orphan_ parameter, these results all have a _None_ value and are not shown, yet the batch navigation drops the last page that would contain them. Manually adding something like `?b_start:int=10` actually shows the results.

As a side note: I found a doctest (tests/search.txt) that specifically tests whether the last batch page is dropped, but it should probably also check whether all results are displayed.