Lines 292-307
sub get_fixer_rules {
Link Here
|
292 |
sub { |
292 |
sub { |
293 |
my ( $name, $type, $facet, $suggestible, $sort, $marc_type, $marc_field ) = @_; |
293 |
my ( $name, $type, $facet, $suggestible, $sort, $marc_type, $marc_field ) = @_; |
294 |
return if $marc_type ne $marcflavour; |
294 |
return if $marc_type ne $marcflavour; |
295 |
my $options =''; |
|
|
296 |
|
295 |
|
297 |
push @rules, "marc_map('$marc_field','${name}.\$append', $options)"; |
296 |
push @rules, "marc_map('$marc_field','${name}.\$append', pluck:0, join:' ')"; |
298 |
if ($facet) { |
297 |
if ($facet) { |
299 |
push @rules, "marc_map('$marc_field','${name}__facet.\$append', $options)"; |
298 |
push @rules, "marc_map('$marc_field','${name}__facet.\$append', pluck:0, join:' ')"; |
300 |
} |
299 |
} |
301 |
if ($suggestible) { |
300 |
if ($suggestible) { |
302 |
push @rules, |
301 |
push @rules, |
303 |
#"marc_map('$marc_field','${name}__suggestion.input.\$append', '')"; #must not have nested data structures in .input |
302 |
#"marc_map('$marc_field','${name}__suggestion.input.\$append', '')"; #must not have nested data structures in .input |
304 |
"marc_map('$marc_field','${name}__suggestion.input.\$append')"; |
303 |
"marc_map('$marc_field','${name}__suggestion.input.\$append', pluck:0, join:' ')"; |
305 |
} |
304 |
} |
306 |
if ( $type eq 'boolean' ) { |
305 |
if ( $type eq 'boolean' ) { |
307 |
|
306 |
|
Lines 315-321
sub get_fixer_rules {
Link Here
|
315 |
} |
314 |
} |
316 |
if ($self->sort_fields()->{$name}) { |
315 |
if ($self->sort_fields()->{$name}) { |
317 |
if ($sort || !defined $sort) { |
316 |
if ($sort || !defined $sort) { |
318 |
push @rules, "marc_map('$marc_field','${name}__sort.\$append', $options)"; |
317 |
push @rules, "marc_map('$marc_field','${name}__sort.\$append', pluck:0, join:' ')"; |
319 |
} |
318 |
} |
320 |
} |
319 |
} |
321 |
} |
320 |
} |
322 |
- |
|
|