View | Details | Raw Unified | Return to bug 24720
Collapse All | Expand All

(-)a/Koha/SearchEngine/Elasticsearch.pm (-1 / +2 lines)
Lines 676-681 sub marc_records_to_documents { Link Here
676
                if ($field =~ /__sort$/) {
676
                if ($field =~ /__sort$/) {
677
                    # Make sure to keep the sort field length sensible. 255 was chosen as a nice round value.
677
                    # Make sure to keep the sort field length sensible. 255 was chosen as a nice round value.
678
                    $record_document->{$field} = [substr(join(' ', @{$record_document->{$field}}), 0, 255)];
678
                    $record_document->{$field} = [substr(join(' ', @{$record_document->{$field}}), 0, 255)];
679
                    # Strip any initial non-word characters which don't make much sense to sort on
680
                    $record_document->{$field} = [map { s/^\W+//u; $_ } @{$record_document->{$field}}];
679
                }
681
                }
680
            }
682
            }
681
        }
683
        }
682
- 

Return to bug 24720