Use NullSearchResults object in case sphinx raises "out of bounds"
authorMarcin Kulik <m@ku1ik.com>
Thu, 3 Oct 2013 10:46:36 +0000 (12:46 +0200)
committerMarcin Kulik <m@ku1ik.com>
Thu, 3 Oct 2013 10:46:36 +0000 (12:46 +0200)
commitbea63a1d6bf48951987f91a09d207ce15e83567d
treee397bb463473e7e95b7d4e544977a12566d46546
parenta9886e54d4f4111fbb182b2d8e2a3660febae595
Use NullSearchResults object in case sphinx raises "out of bounds"

When the requested page makes the calculated offset higher than sphinx's
max_matches it raises "offset out of bounds (offset=110490,
max_matches=1000)". This change handles this case by returning a
null-object instead.
app/controllers/searches_controller.rb