]> git.joonet.de Git - adminer.git/commit
Elastic: Properly display sparse result rows
authorChristian Weiske <cweiske@cweiske.de>
Fri, 28 Feb 2025 11:45:03 +0000 (12:45 +0100)
committerJakub Vrána <jakub@vrana.cz>
Mon, 10 Mar 2025 20:14:54 +0000 (21:14 +0100)
commitfde7d7dde2ffd57f9e18cbc7328073ad8b34e95d
treec3389713d2151a684d7c579fef263b2502146ae2
parente9934624123cb78b3648175d69478e53b80e4380
Elastic: Properly display sparse result rows

Result records in Elasticsearch do not always have all columns
that are defined in an index.
This often happens when multiple document types are stored in the same index.

The first row has columns ["_id", "html", "url"], while the second
misses the "html" column: ["_id", "url"].

Adminer expects that all result rows include all columns.
This leads to the problem that the "url" value in the 2nd example row
was rendered in the "html" column.

This patch fixes this problem by fetching the actual column list first
when all fields are to be shown, and using that field list
as base for all rows.
plugins/drivers/elastic.php