Bug 17278: Use available limit when requesting zebra when ccl query is used
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 3 Oct 2016 09:45:13 +0000 (10:45 +0100)
committerMason James <mtj@kohaaloha.com>
Mon, 12 Dec 2016 01:54:14 +0000 (14:54 +1300)
commit6391564606507c6edf80b2e5425cee57cb7e1db5
tree832368069d51c1a0bd7a453e322e7e9afe9e3c9a
parentd02b7cf5297b4efbc763e5e79fc8e7d8e4088918
Bug 17278: Use available limit when requesting zebra when ccl query is used

When a ccl query is used, the buildQuery subroutine does not handle
the available limit (not an index).
This available limit is handle later in the subroutine.
This affect the author links on the detail page for instance (an=xx).
A much better solution would be to keep an 'available' zebra index up-to-date.

Test plan:
(OPAC or staff interface, it does not matter)
- Launch a search, click on a result and then on an author link to
  launch another query (an:xx)
- Limit to available items without the 'facet'
=> Without this patch you won't get any results
=> With this patch applied you should get relevant result (regarding the
known bugs 16970, 13715, 13658, 5463, etc.)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
C4/Search.pm
t/db_dependent/Search.t