toastdriven/django-haystack — pull request #872 by kezabelle (2013-10-05 15:47:15+00:00)
Title: Whoosh fixes

- d104c0e fixes two tickets related to being unable to use models() with recent versions of Whoosh, because of changes in how it reports the lengths of objects.
- cd04807 swaps out the ResultsPage if possible, for a subclass which accurately calculates the scored results, fixing the `test_more_like_this` which was previously marked as an expected failure.
- 4f1c676 indents the refreshing of the index, so that refresh isn't called if nothing happened between the original refresh and the second call.
- 6c3d695 removes the need to call a method on the `raw_page` with the offset to determine the score; internally this just asks the Results for the Hit's score anyway. I've had to check that one manually, because the `test_scoring` unittest is marked as expecting failure, and I can't find an explanation for *why* in the commit history.

Commits are bunched up like that so that they can be cherry-picked rather than merged wholesale, if needed.

If anyone can figure out *why* `test_scoring` *should* fail, rather than why it *is* failing (which largely appears to be because the scores are different, but consistently so), I can probably try and fix that, too.