|
Lines 273-297
sub raw_elasticsearch_mappings {
Link Here
|
| 273 |
); |
273 |
); |
| 274 |
|
274 |
|
| 275 |
while ( my $marc_to_field = $marc_to_fields->next ) { |
275 |
while ( my $marc_to_field = $marc_to_fields->next ) { |
| 276 |
|
|
|
| 277 |
my $marc_map = $marc_to_field->search_marc_map; |
276 |
my $marc_map = $marc_to_field->search_marc_map; |
| 278 |
|
277 |
|
| 279 |
next if $marc_type && $marc_map->marc_type ne $marc_type; |
278 |
next if $marc_type && $marc_map->marc_type ne $marc_type; |
| 280 |
|
279 |
|
| 281 |
$mappings->{ $marc_map->index_name }{ $search_field->name }{label} = $search_field->label; |
280 |
my $field = $mappings->{ $marc_map->index_name }->{ $search_field->name } = {}; |
| 282 |
$mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type; |
281 |
$field->{label} = $search_field->label; |
| 283 |
$mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order if defined $search_field->facet_order; |
282 |
$field->{type} = $search_field->type; |
| 284 |
$mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight if defined $search_field->weight; |
283 |
$field->{facet_order} = $search_field->facet_order if defined $search_field->facet_order; |
|
|
284 |
$field->{weight} = $search_field->weight if defined $search_field->weight; |
| 285 |
$field->{opac} = $search_field->opac if defined $search_field->opac; |
| 286 |
$field->{staff_client} = $search_field->staff_client if defined $search_field->staff_client; |
| 285 |
|
287 |
|
| 286 |
push (@{ $mappings->{ $marc_map->index_name }{ $search_field->name }{mappings} }, |
288 |
push @{ $field->{mappings} }, |
| 287 |
{ |
289 |
{ |
| 288 |
facet => $marc_to_field->facet || '', |
290 |
facet => $marc_to_field->facet || '', |
| 289 |
marc_type => $marc_map->marc_type, |
291 |
marc_type => $marc_map->marc_type, |
| 290 |
marc_field => $marc_map->marc_field, |
292 |
marc_field => $marc_map->marc_field, |
| 291 |
sort => $marc_to_field->sort, |
293 |
sort => $marc_to_field->sort, |
| 292 |
suggestible => $marc_to_field->suggestible || '' |
294 |
suggestible => $marc_to_field->suggestible || '' |
| 293 |
}); |
295 |
}; |
| 294 |
|
|
|
| 295 |
} |
296 |
} |
| 296 |
} |
297 |
} |
| 297 |
|
298 |
|
| 298 |
- |
|
|