Bug 33594: Update mappings and comment

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-05-04 11:34:25 +00:00 committed by Tomas Cohen Arazi
parent d56b959fea
commit 7f1f0bc5b7
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 3548 additions and 3036 deletions

View File

@ -224,9 +224,10 @@ sub get_elasticsearch_mappings {
if ($suggestible) {
$mappings->{properties}{ $name . '__suggestion' } = _get_elasticsearch_field_config('suggestible', $es_type);
}
# Sort is a bit special as it can be true, false, undef.
# We care about "true" or "undef",
# Sort should be defined in mappings as 1 (Yes) or 0 (No)
# Previously, we also supported ~ (Undef) in the file
# "undef" means to do the default thing, which is make it sortable.
# This is preserved in order to not cause breakages for existing installs
if (!defined $sort || $sort) {
$mappings->{properties}{ $name . '__sort' } = _get_elasticsearch_field_config('sort', $es_type);
$sort_fields{$self->index}{$name} = 1;

File diff suppressed because it is too large Load Diff