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>
Wed, 22 Nov 2017 09:10:00 +0000 (22:10 +1300)
commitd0c7d92334e52aa0df29b8a4f7f8a27cf9a1e33c
tree7b5c0724d26d5d9ffb0a686a49922e65440ef5b2
parent19d62411e77edfa7a6f40645a3a20d9e1300b468
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