Lines 992-1000
sub _sort_field {
Link Here
|
992 |
my $textField = defined $mappings->{data}{properties}{$f}{type} && $mappings->{data}{properties}{$f}{type} eq 'text'; |
992 |
my $textField = defined $mappings->{data}{properties}{$f}{type} && $mappings->{data}{properties}{$f}{type} eq 'text'; |
993 |
if (!defined $self->sort_fields()->{$f} || $self->sort_fields()->{$f}) { |
993 |
if (!defined $self->sort_fields()->{$f} || $self->sort_fields()->{$f}) { |
994 |
$f .= '__sort'; |
994 |
$f .= '__sort'; |
995 |
# We need to add '.phrase' to text fields, otherwise it'll sort |
|
|
996 |
# based on the tokenised form. |
997 |
$f .= '.phrase' if $textField; |
998 |
} else { |
995 |
} else { |
999 |
# We need to add '.raw' to text fields without a sort field, |
996 |
# We need to add '.raw' to text fields without a sort field, |
1000 |
# otherwise it'll sort based on the tokenised form. |
997 |
# otherwise it'll sort based on the tokenised form. |