|
Lines 215-223
sub get_elasticsearch_mappings {
Link Here
|
| 215 |
search_analyzer => 'simple', |
215 |
search_analyzer => 'simple', |
| 216 |
}; |
216 |
}; |
| 217 |
} |
217 |
} |
| 218 |
# Sort may be true, false, or undef. Here we care if it's |
218 |
# Sort is a bit special as it can be true, false, undef. |
| 219 |
# anything other than undef. |
219 |
# We care about "true" or "undef", |
| 220 |
if (defined $sort) { |
220 |
# "undef" means to do the default thing, which is make it sortable. |
|
|
221 |
if ($sort || !defined $sort) { |
| 221 |
$mappings->{data}{properties}{ $name . '__sort' } = { |
222 |
$mappings->{data}{properties}{ $name . '__sort' } = { |
| 222 |
search_analyzer => "analyser_phrase", |
223 |
search_analyzer => "analyser_phrase", |
| 223 |
analyzer => "analyser_phrase", |
224 |
analyzer => "analyser_phrase", |
|
Lines 346-359
sub get_fixer_rules {
Link Here
|
| 346 |
if ($type eq 'sum' ) { |
347 |
if ($type eq 'sum' ) { |
| 347 |
push @rules, "sum('$name')"; |
348 |
push @rules, "sum('$name')"; |
| 348 |
} |
349 |
} |
| 349 |
# Sort is a bit special as it can be true, false, undef. For |
|
|
| 350 |
# fixer rules, we care about "true", or "undef" if there is |
| 351 |
# special handling of this field from other one. "undef" means |
| 352 |
# to do the default thing, which is make it sortable. |
| 353 |
if ($self->sort_fields()->{$name}) { |
350 |
if ($self->sort_fields()->{$name}) { |
| 354 |
if ($sort || !defined $sort) { |
351 |
push @rules, "marc_map('$marc_field','${name}__sort.\$append', $options)"; |
| 355 |
push @rules, "marc_map('$marc_field','${name}__sort.\$append', $options)"; |
|
|
| 356 |
} |
| 357 |
} |
352 |
} |
| 358 |
} |
353 |
} |
| 359 |
); |
354 |
); |
| 360 |
- |
|
|