https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42540

--- Comment #10 from David Nind <[email protected]> ---
Created attachment 202894
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202894&action=edit
Bug 42540: Trap and throw elastic too_many_clauses errors instead of just dying

This started out as an issue with Connexion gateway, but it's not actually
directly related.

The issue is that during import, a record may contain so many fields to match
on that it exceeds the max clauses an es server is configured for. In this case
Koha 500's and connex emits the generic "Unsuccessful request" error.

It seems the best patch forward would be to trap this error and propagate it as
a Koha Exception, rather than simply die. There may be other elastic errors we
could add to this pattern but I've not encountered any others so far.

Test Plan:
1) Ensure your Koha instance is configured to use Elastic, and the
   maxClauseCount is set to 1024 or less
   (You can spin up a KTD with es7 which uses this as default)
2) Apply the first two patches (exceptions and unit tests)
3) Prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4) It fails
5) Apply this patch
6) Prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
7) It succeeds!

Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to