Lines 323-342
sub get_fixer_rules {
Link Here
|
323 |
sub { |
323 |
sub { |
324 |
my ( $name, $type, $facet, $suggestible, $sort, $marc_type, $marc_field ) = @_; |
324 |
my ( $name, $type, $facet, $suggestible, $sort, $marc_type, $marc_field ) = @_; |
325 |
return if $marc_type ne $marcflavour; |
325 |
return if $marc_type ne $marcflavour; |
326 |
my $options = ''; |
326 |
my $options =''; |
327 |
|
327 |
|
328 |
# There's a bug when using 'split' with something that |
|
|
329 |
# selects a range |
330 |
# The split makes everything into nested arrays, but that's not |
331 |
# really a big deal, ES doesn't mind. |
332 |
$options = '' unless $marc_field =~ m|_/| || $type eq 'sum'; |
333 |
push @rules, "marc_map('$marc_field','${name}.\$append', $options)"; |
328 |
push @rules, "marc_map('$marc_field','${name}.\$append', $options)"; |
334 |
if ($facet) { |
329 |
if ($facet) { |
335 |
push @rules, "marc_map('$marc_field','${name}__facet.\$append', $options)"; |
330 |
push @rules, "marc_map('$marc_field','${name}__facet.\$append', $options)"; |
336 |
} |
331 |
} |
337 |
if ($suggestible) { |
332 |
if ($suggestible) { |
338 |
push @rules, |
333 |
push @rules, |
339 |
#"marc_map('$marc_field','${name}__suggestion.input.\$append', $options)"; #must not have nested data structures in .input |
334 |
#"marc_map('$marc_field','${name}__suggestion.input.\$append', '')"; #must not have nested data structures in .input |
340 |
"marc_map('$marc_field','${name}__suggestion.input.\$append')"; |
335 |
"marc_map('$marc_field','${name}__suggestion.input.\$append')"; |
341 |
} |
336 |
} |
342 |
if ( $type eq 'boolean' ) { |
337 |
if ( $type eq 'boolean' ) { |
343 |
- |
|
|