Work around a bug in boolean values in Haystack's Elasticsearch 7 backend.

Review Request #12882 — Created March 10, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

Haystack's Elasticsearch 7 backend has a bug where boolean values were
being serialized as True or False. Starting in Elasticsearch 7,
these must explicitly be true or false.

We ship copies of the Elasticsearch backends, originally intended as
backports for Review Board 4, but this gives us the opportunity to work
around this in our end. Since Haystack hasn't had a release in a year,
and this bug was reported to them about that long ago, we can't rely on
a version bump any time soon.

This change patches our copy of the Elasticsearch 7 backend to properly
serialize booleans.

The Haystack bug report is available at:

https://github.com/django-haystack/django-haystack/issues/1851

Set up Elasticsearch 7 and triggered the bug. Verified that the fix
allowed me to properly set up a search involving booleans.

Commits

Files