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

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

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.

Summary ID
Work around a bug in boolean values in Haystack's Elasticsearch 7 backend.
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.
596b3d323b72768e8c4cc264c40ab1d38b32cb52
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (625e273)