}
);
# This sorts the facets into alphabetical order
if (@facets_loop) {
foreach my $f (@facets_loop) {
my $jmax = $size > $facets_maxrecs
? $facets_maxrecs
: $size;
for ( my $j = 0 ; $j < $jmax ; $j++ ) {
my $marc_record = new_record_from_zebra (
sub _get_facets_data_from_record {
my ( $marc_record, $facets, $facets_counter ) = @_;
for my $facet (@$facets) {
my @used_datas = ();
foreach my $tag ( @{ $facet->{ tags } } ) {
next if $field->indicator(1) eq 'z';
my $data = $field->as_string( $subfield_letters, $facet->{ sep } );
$data =~ s/\s*(?<![A-Z])[.\-,;]\s*$//;
unless ( grep { $_ eq $data } @used_datas ) {
push @used_datas, $data;
my $facets = {};
foreach my $term ( @terms ) {
my $facet_value = $term->textContent;
$facet_value =~ s/\s*(?<![A-Z])[.\-,;]\s*$//;
$facet_value =~ s/\Q$internal_sep\E/$sep/ if defined $sep;
$facets->{ $facet_value } = $term->getAttribute( 'occur' );
$facets->{ $facet_value } = ( defined $facets->{$facet_value} ) ? $facets->{ $facet_value } + $term->getAttribute( 'occur' ) : $term->getAttribute( 'occur' );
return $facets;
facet:
default:
type: keyword
normalizer: facet_normalizer
# Suggestible
suggestible:
nfkc_cf_normalizer:
type: custom
char_filter: icu_normalizer
facet_normalizer:
char_filter: facet
char_filter:
# The punctuation filter is used to remove any punctuation chars in fields that don't use icu_tokenizer.
punctuation:
# The pattern contains all ASCII punctuation characters.
pattern: '([\x00-\x1F,\x21-\x2F,\x3A-\x40,\x5B-\x60,\x7B-\x89,\x8B,\x8D,\x8F,\x90-\x99,\x9B,\x9D,\xA0-\xBF,\xD7,\xF7])'
replacement: ''
type: pattern_replace
pattern: '\s*(?<![A-Z])[.\-,;]\s*$'
index.mapping.total_fields.limit: 10000
-