]> git.joonet.de Git - adminer.git/commit
Elastic: Fix text search on boolean fields
authorChristian Weiske <cweiske@cweiske.de>
Fri, 28 Feb 2025 13:32:23 +0000 (14:32 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 3 Mar 2025 09:40:38 +0000 (10:40 +0100)
commitd5a17835ffa73f555cdcdb96d4b4bee1a714451a
tree9c3809e301ad35b357a6e416ee59d2fd7b5271ec
parent4967a40410aba2b42375a9898449dd37d64d875e
Elastic: Fix text search on boolean fields

When searching in all fields for a text value, an error was thrown
with ElasticSearch 7.17.23 when the index contains boolean fields:

> query_shard_exception: failed to create query:
> Can't parse boolean value [textvalue], expected [true] or [false]

This patch fixes that problem by skipping boolean fields when the
search word is not the string "true" or "false".
changes.txt
plugins/drivers/elastic.php