From 6d53910f0ca05ae41b0d10ce6f3eb274efd3aca4 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Fri, 3 Nov 2017 13:21:22 +0100 Subject: [PATCH] Bug 19575: Use canonical field names and resolve aliased fields Adjust elastic search mappings to more closely match Zebra equivalents resolving serveral issues with coded Zebra searches in templates and sorting of search results in UI. Also make field names in search strings case insensitive to accept case variations in template links and user input. Sponsored-by: Gothenburg University Library Signed-off-by: Nick Clemens Signed-off-by: Ere Maijala Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- Koha/SearchEngine/Elasticsearch.pm | 4 +- .../Elasticsearch/QueryBuilder.pm | 157 +- Koha/SearchEngine/Elasticsearch/Search.pm | 14 +- .../searchengine/elasticsearch/mappings.yaml | 2221 ++++++++++++----- ...field-names-and-resolve-aliased-fields.sql | 29 + .../SearchEngine/Elasticsearch/QueryBuilder.t | 16 +- 6 files changed, 1782 insertions(+), 659 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index d51c11e351..f7aa3826bb 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -860,7 +860,9 @@ sub _foreach_mapping { while ( my $search_field = $search_fields->next ) { $sub->( - $search_field->name, + # Force lower case on indexed field names for case insensitive + # field name searches + lc($search_field->name), $search_field->type, $search_field->get_column('facet'), $search_field->get_column('suggestible'), diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index 6d79807e2c..e2e4beadeb 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -111,13 +111,13 @@ sub build_query { # See _convert_facets in Search.pm for how these get turned into # things that Koha can use. $res->{aggregations} = { - author => { terms => { field => "author__facet" } }, - subject => { terms => { field => "subject__facet" } }, - itype => { terms => { field => "itype__facet" } }, + author => { terms => { field => "author__facet" } }, + subject => { terms => { field => "subject__facet" } }, + itype => { terms => { field => "itype__facet" } }, location => { terms => { field => "location__facet" } }, 'su-geo' => { terms => { field => "su-geo__facet" } }, - se => { terms => { field => "se__facet" } }, - ccode => { terms => { field => "ccode__facet" } }, + 'title-series' => { terms => { field => "title-series__facet" } }, + ccode => { terms => { field => "ccode__facet" } }, }; my $display_library_facets = C4::Context->preference('DisplayLibraryFacets'); @@ -411,12 +411,12 @@ appropriate search object. =cut our $koha_to_index_name = { - mainmainentry => 'Heading-Main', - mainentry => 'Heading', - match => 'Match', - 'match-heading' => 'Match-heading', - 'see-from' => 'Match-heading-see-from', - thesaurus => 'Subject-heading-thesaurus', + mainmainentry => 'heading-main', + mainentry => 'heading', + match => 'match', + 'match-heading' => 'match-heading', + 'see-from' => 'match-heading-see-from', + thesaurus => 'subject-heading-thesaurus', any => '', all => '' }; @@ -430,6 +430,9 @@ sub build_authorities_query_compat { # extensible hash form that is understood by L. my @searches; + # Convert to lower case + $marclist = [map(lc, @{$marclist})]; + # Make sure everything exists foreach my $m (@$marclist) { Koha::Exceptions::WrongParameter->throw("Invalid marclist field provided: $m") @@ -447,8 +450,8 @@ sub build_authorities_query_compat { my %sort; my $sort_field = - ( $orderby =~ /^Heading/ ) ? 'Heading' - : ( $orderby =~ /^Auth/ ) ? 'Local-number' + ( $orderby =~ /^heading/ ) ? 'heading' + : ( $orderby =~ /^auth/ ) ? 'local-number' : undef; if ($sort_field) { my $sort_order = ( $orderby =~ /Asc$/ ) ? 'asc' : 'desc'; @@ -479,13 +482,13 @@ sub _convert_sort_fields { # Turn the sorting into something we care about. my %sort_field_convert = ( - acqdate => 'acqdate', + acqdate => 'date-of-acquisition', author => 'author', - call_number => 'callnum', + call_number => 'local-classification', popularity => 'issues', relevance => undef, # default title => 'title', - pubdate => 'pubdate', + pubdate => 'date-of-publication', ); my %sort_order_convert = ( qw( desc desc ), qw( dsc desc ), qw( asc asc ), qw( az asc ), qw( za desc ) ); @@ -515,23 +518,89 @@ types. =cut our %index_field_convert = ( - 'kw' => '_all', - 'ti' => 'title', - 'au' => 'author', - 'su' => 'subject', - 'nb' => 'isbn', - 'se' => 'title-series', - 'callnum' => 'callnum', - 'itype' => 'itype', - 'ln' => 'ln', - 'branch' => 'homebranch', - 'fic' => 'lf', - 'mus' => 'rtype', - 'aud' => 'ta', - 'hi' => 'Host-Item-Number', - 'at' => 'authtype', - 'he' => 'Heading' + 'kw' => '_all', + 'ab' => 'abstract', + 'au' => 'author', + 'lcn' => 'local-classification', + 'callnum' => 'local-classification', + 'record-type' => 'rtype', + 'mc-rtype' => 'rtype', + 'mus' => 'rtype', + 'lc-card' => 'lc-card-number', + 'sn' => 'local-number', + 'yr' => 'date-of-publication', + 'pubdate' => 'date-of-publication', + 'acqdate' => 'date-of-acquisition', + 'date/time-last-modified' => 'date-time-last-modified', + 'dtlm' => 'date/time-last-modified', + 'diss' => 'dissertation-information', + 'nb' => 'isbn', + 'ns' => 'issn', + 'music-number' => 'identifier-publisher-for-music', + 'number-music-publisher' => 'identifier-publisher-for-music', + 'music' => 'identifier-publisher-for-music', + 'ident' => 'identifier-standard', + 'cpn' => 'corporate-name', + 'cfn' => 'conference-name', + 'pn' => 'personal-name', + 'pb' => 'publisher', + 'pv' => 'provider', + 'nt' => 'note', + 'notes' => 'note', + 'rcn' => 'record-control-number', + 'su' => 'subject', + 'su-to' => 'subject', + #'su-geo' => 'subject', + 'su-ut' => 'subject', + 'ti' => 'title', + 'se' => 'title-series', + 'ut' => 'title-uniform', + 'an' => 'authority-number', + 'koha-auth-number' => 'authority-number', + 'at' => 'authtype', + 'he' => 'heading', + 'rank' => 'relevance', + 'phr' => 'st-phrase', + 'wrdl' => 'st-word-list', + 'rt' => 'right-truncation', + 'rtrn' => 'right-truncation', + 'ltrn' => 'left-truncation', + 'rltrn' => 'left-and-right', + 'mc-itemtype' => 'itemtype', + 'mc-ccode' => 'ccode', + 'branch' => 'homebranch', + 'mc-loc' => 'location', + 'stocknumber' => 'number-local-acquisition', + 'inv' => 'number-local-acquisition', + 'bc' => 'barcode', + 'mc-itype' => 'itype', + 'aub' => 'author-personal-bibliography', + 'auo' => 'author-in-order', + 'ff8-22' => 'ta', + 'aud' => 'ta', + 'audience' => 'ta', + 'frequency-code' => 'ff8-18', + 'illustration-code' => 'ff8-18-21', + 'regularity-code' => 'ff8-19', + 'type-of-serial' => 'ff8-21', + 'format' => 'ff8-23', + 'conference-code' => 'ff8-29', + 'festschrift-indicator' => 'ff8-30', + 'index-indicator' => 'ff8-31', + 'fiction' => 'lf', + 'fic' => 'lf', + 'literature-code' => 'lf', + 'biography' => 'bio', + 'ff8-34' => 'bio', + 'biography-code' => 'bio', + 'l-format' => 'ff7-01-02', + 'lex' => 'lexile-number', + 'hi' => 'host-item-number', + 'itu' => 'index-term-uncontrolled', + 'itg' => 'index-term-genre', ); +my $field_name_pattern = '[\w\-]+'; +my $multi_field_pattern = "(?:\\.$field_name_pattern)*"; sub _convert_index_fields { my ( $self, @indexes ) = @_; @@ -544,14 +613,15 @@ sub _convert_index_fields { # when joining things, to indicate we make it an 'OR' join. # (Sorry, this got a bit ugly after special cases were found.) grep { $_->{field} } map { - my ( $f, $t ) = split /,/; + # Lower case all field names + my ( $f, $t ) = map(lc, split /,/); my $mc = ''; if ($f =~ /^mc-/) { $mc = 'mc-'; $f =~ s/^mc-//; } my $r = { - field => $index_field_convert{$f}, + field => exists $index_field_convert{$f} ? $index_field_convert{$f} : $f, type => $index_type_convert{ $t // '__default' } }; $r->{field} = ($mc . $r->{field}) if $mc && $r->{field}; @@ -606,9 +676,21 @@ will have to wait for a real query parser. sub _convert_index_strings_freeform { my ( $self, $search ) = @_; - while ( my ( $zeb, $es ) = each %index_field_convert ) { - $search =~ s/\b$zeb(?:,[\w\-]*)?:/$es:/g; - } + # @TODO: Currenty will alter also fields contained within quotes: + # `searching for "stuff cn:123"` for example will become + # `searching for "stuff local-number:123" + # + # Fixing this is tricky, one possibility: + # https://stackoverflow.com/questions/19193876/perl-regex-to-match-a-string-that-is-not-enclosed-in-quotes + # Still not perfect, and will not handle escaped quotes within quotes and assumes balanced quotes. + # + # Another, not so elegant, solution could be to replace all quoted content with placeholders, and put + # them back when processing is done. + + # Lower case field names + $search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og; + # Resolve possible field aliases + $search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1)."$2:"/oge; return $search; } @@ -805,6 +887,7 @@ operands and double quoted strings. =cut +my $tokenize_split_re = qr/((?:${field_name_pattern}${multi_field_pattern}:)?"[^"]+"|\s+)/; sub _truncate_terms { my ( $self, $query ) = @_; diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index 4bc259a067..ea166b597e 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -207,7 +207,7 @@ sub search_auth_compat { # rather than hard-coded conversions. #my $record = $_[0]; # Handle legacy nested arrays indexed with splitting enabled. - my $authid = $record->{ 'Local-number' }[0]; + my $authid = $record->{ 'local-number' }[0]; $authid = @$authid[0] if (ref $authid eq 'ARRAY'); $result{authid} = $authid; @@ -266,7 +266,7 @@ sub count_auth_use { query => { bool => { # query => { match_all => {} }, - filter => { term => { an => $authid } } + filter => { term => { 'authority-number' => $authid } } } } }; @@ -438,13 +438,13 @@ sub _convert_facets { # things that zebra uses. # TODO let the library define the order using the interface. my %type_to_label = ( - author => { order => 1, label => 'Authors', }, - itype => { order => 2, label => 'ItemTypes', }, + author => { order => 1, label => 'Authors', }, + itype => { order => 2, label => 'ItemTypes', }, location => { order => 3, label => 'Location', }, 'su-geo' => { order => 4, label => 'Places', }, - se => { order => 5, label => 'Series', }, - subject => { order => 6, label => 'Topics', }, - ccode => { order => 7, label => 'CollectionCodes',}, + 'title-series' => { order => 5, label => 'Series', }, + subject => { order => 6, label => 'Topics', }, + ccode => { order => 7, label => 'CollectionCodes',}, holdingbranch => { order => 8, label => 'HoldingLibrary' }, homebranch => { order => 9, label => 'HomeLibrary' } ); diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml index 5c04f2eeef..f4b3783bf0 100644 --- a/admin/searchengine/elasticsearch/mappings.yaml +++ b/admin/searchengine/elasticsearch/mappings.yaml @@ -1153,1266 +1153,1840 @@ authorities: suggestible: '' type: '' biblios: - Host-Item-Number: - label: Host-Item-Number + abstract: + label: abstract mappings: - facet: '' - marc_field: '7739' + marc_field: '520' marc_type: marc21 sort: ~ suggestible: '' + type: '' + acqsource: + label: acqsource + mappings: - facet: '' - marc_field: '7739' - marc_type: normarc + marc_field: 952e + marc_type: marc21 sort: ~ suggestible: '' + type: '' + arl: + label: arl + mappings: - facet: '' - marc_field: '4619' - marc_type: unimarc + marc_field: 526c + marc_type: marc21 sort: ~ suggestible: '' - type: number - Local-number: - label: Local-number + type: '' + arp: + label: arp mappings: - facet: '' - marc_field: 999c + marc_field: 526d marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: 999c + type: '' + author: + label: author + mappings: + - facet: '1' + marc_field: 100a + marc_type: marc21 + sort: ~ + suggestible: '1' + - facet: '1' + marc_field: 110a + marc_type: marc21 + sort: ~ + suggestible: '1' + - facet: '1' + marc_field: 111a + marc_type: marc21 + sort: ~ + suggestible: '1' + - facet: 0 + marc_field: 245c + marc_type: marc21 + sort: ~ + suggestible: 0 + - facet: 1 + marc_field: 700a + marc_type: marc21 + sort: ~ + suggestible: 1 + - facet: '1' + marc_field: 100a marc_type: normarc sort: ~ - suggestible: '' - - facet: '' - marc_field: '001' + suggestible: '1' + - facet: '1' + marc_field: 110a + marc_type: normarc + sort: ~ + suggestible: '1' + - facet: '1' + marc_field: 111a + marc_type: normarc + sort: ~ + suggestible: '1' + - facet: 0 + marc_field: 245c + marc_type: normarc + sort: ~ + suggestible: 0 + - facet: 1 + marc_field: 700a + marc_type: normarc + sort: ~ + suggestible: 1 + - facet: '1' + marc_field: 200f marc_type: unimarc sort: ~ - suggestible: '' + suggestible: '1' + - facet: '1' + marc_field: 200g + marc_type: unimarc + sort: ~ + suggestible: '1' + - facet: 1 + marc_field: 700a + marc_type: unimarc + sort: ~ + suggestible: 1 + - facet: 0 + marc_field: '701' + marc_type: unimarc + sort: ~ + suggestible: 0 type: string - acqdate: - label: acqdate + author-in-order: + label: author-in-order mappings: - facet: '' - marc_field: 952d + marc_field: 245c marc_type: marc21 - sort: 1 - suggestible: '' - - facet: '' - marc_field: 952d - marc_type: normarc - sort: 1 - suggestible: '' - - facet: '' - marc_field: '9955' - marc_type: unimarc - sort: 1 + sort: ~ suggestible: '' - type: date - an: - label: an + type: '' + author-name-corporate: + label: author-name-corporate mappings: - facet: '' - marc_field: '1009' + marc_field: '110' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '1109' + marc_field: '111' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '1119' + marc_field: '711' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '1309' + marc_field: '810' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '2459' + marc_field: '811' marc_type: marc21 sort: ~ suggestible: '' + type: '' + author-name-personal: + label: author-name-personal + mappings: - facet: '' - marc_field: '4009' + marc_field: '100' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '4109' + marc_field: '400' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '4409' + marc_field: '700' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '4909' + marc_field: '800' marc_type: marc21 sort: ~ suggestible: '' + type: '' + author-personal-bibliography: + label: author-personal-bibliography + mappings: - facet: '' - marc_field: '6009' + marc_field: 100a marc_type: marc21 sort: ~ suggestible: '' + type: '' + author-title: + label: author-title + mappings: - facet: '' - marc_field: '6109' + marc_field: '100' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6119' + marc_field: '110' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6309' + marc_field: '111' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6509' + marc_field: 400t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6519' + marc_field: 410t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6529' + marc_field: 411t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6539' + marc_field: 700t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6549' + marc_field: 710t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6559' + marc_field: 711t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6569' + marc_field: 800t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6579' + marc_field: 810t marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6909' + marc_field: 811t marc_type: marc21 sort: ~ suggestible: '' + type: '' + barcode: + label: barcode + mappings: - facet: '' - marc_field: '7009' + marc_field: 952p marc_type: marc21 sort: ~ suggestible: '' + type: '' + bgf-number: + label: bgf-number + mappings: - facet: '' - marc_field: '7109' + marc_field: '015' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7119' - marc_type: marc21 + marc_field: '015' + marc_type: normarc sort: ~ suggestible: '' + type: '' + bib-level: + label: bib-level + mappings: - facet: '' - marc_field: '7309' + marc_field: leader_/7 marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7519' - marc_type: marc21 + marc_field: leader_/7 + marc_type: normarc sort: ~ suggestible: '' + type: '' + biblioitemnumber: + label: biblioitemnumber + mappings: - facet: '' - marc_field: '8009' + marc_field: 999d marc_type: marc21 sort: ~ suggestible: '' + type: '' + bio: + label: bio + mappings: - facet: '' - marc_field: '8109' + marc_field: '008_/34' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '8119' - marc_type: marc21 + marc_field: '008_/34' + marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: '8309' - marc_type: marc21 + marc_field: 105a_/12 + marc_type: unimarc sort: ~ suggestible: '' + type: '' + bnb-card-number: + label: bnb-card-number + mappings: - facet: '' - marc_field: '1009' - marc_type: normarc + marc_field: '015' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: '1109' - marc_type: normarc + type: '' + ccode: + label: collection-code + mappings: + - facet: '1' + marc_field: '9528' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: '1119' + - facet: '1' + marc_field: '9528' marc_type: normarc sort: ~ suggestible: '' - - facet: '' - marc_field: '1309' - marc_type: normarc + - facet: '1' + marc_field: '9958' + marc_type: unimarc sort: ~ suggestible: '' + type: '' + classification-source: + label: classification-source + mappings: - facet: '' - marc_field: '2459' - marc_type: normarc + marc_field: '9522' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-bib-sort: + label: cn-bib-sort + mappings: - facet: '' - marc_field: '4409' - marc_type: normarc + marc_field: '9426' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-bib-source: + label: cn-bib-source + mappings: - facet: '' - marc_field: '4909' - marc_type: normarc + marc_field: '9422' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-class: + label: cn-class + mappings: - facet: '' - marc_field: '6009' - marc_type: normarc + marc_field: 942h + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-item: + label: cn-item + mappings: - facet: '' - marc_field: '6109' - marc_type: normarc + marc_field: 942i + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-prefix: + label: cn-prefix + mappings: - facet: '' - marc_field: '6119' - marc_type: normarc + marc_field: 942k + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-sort: + label: cn-sort + mappings: - facet: '' - marc_field: '6309' - marc_type: normarc + marc_field: '9526' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cn-suffix: + label: cn-suffix + mappings: - facet: '' - marc_field: '6509' - marc_type: normarc + marc_field: 942m + marc_type: marc21 sort: ~ suggestible: '' + type: '' + code-geographic: + label: code-geographic + mappings: - facet: '' - marc_field: '6519' - marc_type: normarc + marc_field: '043' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + code-institution: + label: code-institution + mappings: - facet: '' - marc_field: '6529' - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '' - marc_field: '6539' - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '' - marc_field: '6549' - marc_type: normarc + marc_field: '040' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + coded-location-qualifier: + label: coded-location-qualifier + mappings: - facet: '' - marc_field: '6559' - marc_type: normarc + marc_field: 952f + marc_type: marc21 sort: ~ suggestible: '' + type: '' + coden: + label: coden + mappings: - facet: '' - marc_field: '6569' - marc_type: normarc + marc_field: '030' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + conference-name: + label: conference-name + mappings: - facet: '' - marc_field: '6579' - marc_type: normarc + marc_field: '111' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6909' - marc_type: normarc + marc_field: '411' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7009' - marc_type: normarc + marc_field: '611' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7109' - marc_type: normarc + marc_field: '711' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7119' - marc_type: normarc + marc_field: '811' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + control-number: + label: control-number + mappings: - facet: '' - marc_field: '7309' - marc_type: normarc + marc_field: '001' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '8009' + marc_field: '001' marc_type: normarc sort: ~ suggestible: '' - - facet: '' - marc_field: '8109' - marc_type: normarc + type: '' + copydate: + label: copydate + mappings: + - facet: '1' + marc_field: 260c + marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: '8119' + - facet: '1' + marc_field: 260c marc_type: normarc sort: ~ suggestible: '' + type: date + copynumber: + label: copynumber + mappings: - facet: '' - marc_field: '8309' - marc_type: normarc + marc_field: 952t + marc_type: marc21 sort: ~ suggestible: '' + type: '' + corporate-name: + label: corporate-name + mappings: - facet: '' - marc_field: '5009' - marc_type: unimarc + marc_field: '110' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5019' - marc_type: unimarc + marc_field: '410' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5039' - marc_type: unimarc + marc_field: '610' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5109' - marc_type: unimarc + marc_field: '710' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5129' - marc_type: unimarc + marc_field: '810' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + cross-reference: + label: cross-reference + mappings: - facet: '' - marc_field: '5139' - marc_type: unimarc + marc_field: '1009' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5149' - marc_type: unimarc + marc_field: '2459' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5159' - marc_type: unimarc + marc_field: '7009' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + ctype: + label: ctype + mappings: - facet: '' - marc_field: '5169' - marc_type: unimarc + marc_field: '008_/24-27' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5179' - marc_type: unimarc + marc_field: '008_/24-27' + marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: '5189' + marc_field: 105a_/4-7 marc_type: unimarc sort: ~ suggestible: '' + type: '' + curriculum: + label: curriculum + mappings: - facet: '' - marc_field: '5199' - marc_type: unimarc + marc_field: 658abc + marc_type: marc21 sort: ~ suggestible: '' + type: '' + damaged: + label: damaged + mappings: - facet: '' - marc_field: '5209' - marc_type: unimarc + marc_field: '9524' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + date-entered-on-file: + label: date-entered-on-file + mappings: - facet: '' - marc_field: '5309' - marc_type: unimarc + marc_field: '008_/1-5' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '5319' - marc_type: unimarc + marc_field: '008_/1-5' + marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: '5329' + marc_field: '099c' marc_type: unimarc sort: ~ suggestible: '' + type: '' + date-of-acquisition: + label: date-of-acquisition + mappings: - facet: '' - marc_field: '5409' - marc_type: unimarc - sort: ~ + marc_field: 952d + marc_type: marc21 + sort: 1 suggestible: '' - facet: '' - marc_field: '5419' - marc_type: unimarc - sort: ~ + marc_field: 952d + marc_type: normarc + sort: 1 suggestible: '' - facet: '' - marc_field: '5459' + marc_field: '9955' marc_type: unimarc - sort: ~ + sort: 1 suggestible: '' + type: date + date-time-last-modified: + label: date-time-last-modified + mappings: - facet: '' - marc_field: '5609' - marc_type: unimarc + marc_field: '005' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6009' + marc_field: '099d' marc_type: unimarc sort: ~ suggestible: '' + type: '' + datelastborrowed: + label: datelastborrowed + mappings: - facet: '' - marc_field: '6019' - marc_type: unimarc + marc_field: 952s + marc_type: marc21 sort: ~ suggestible: '' + type: '' + datelastseen: + label: datelastseen + mappings: - facet: '' - marc_field: '6029' - marc_type: unimarc + marc_field: 952r + marc_type: marc21 sort: ~ suggestible: '' + type: '' + dewey-classification: + label: dewey-classification + mappings: - facet: '' - marc_field: '6049' - marc_type: unimarc + marc_field: '082' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + dissertation-information: + label: dissertation-information + mappings: - facet: '' - marc_field: '6059' - marc_type: unimarc + marc_field: '502' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + editor: + label: editor + mappings: - facet: '' - marc_field: '6069' - marc_type: unimarc + marc_field: '700' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6079' - marc_type: unimarc + marc_field: 100a + marc_type: marc21 sort: ~ suggestible: '' + type: '' + extent: + label: extent + mappings: - facet: '' - marc_field: '6089' - marc_type: unimarc + marc_field: '300' + marc_type: marc21 sort: ~ suggestible: '' + type: '' + ff7-00: + label: ff7-00 + mappings: - facet: '' - marc_field: '6109' - marc_type: unimarc + marc_field: 007_/1 + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6159' - marc_type: unimarc + marc_field: 007_/1 + marc_type: normarc sort: ~ suggestible: '' + type: '' + ff7-01: + label: ff7-01 + mappings: - facet: '' - marc_field: '6169' - marc_type: unimarc + marc_field: 007_/2 + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6179' - marc_type: unimarc + marc_field: 007_/2 + marc_type: normarc sort: ~ suggestible: '' + type: '' + ff7-01-02: + label: ff7-01-02 + mappings: - facet: '' - marc_field: '6209' - marc_type: unimarc + marc_field: 007_/1-2 + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '6219' - marc_type: unimarc + marc_field: 007_/1-2 + marc_type: normarc sort: ~ suggestible: '' + type: '' + ff7-02: + label: ff7-02 + mappings: - facet: '' - marc_field: '7009' - marc_type: unimarc + marc_field: 007_/3 + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7019' - marc_type: unimarc + marc_field: 007_/3 + marc_type: normarc sort: ~ suggestible: '' + type: '' + ff8-23: + label: ff8-23 + mappings: - facet: '' - marc_field: '7029' - marc_type: unimarc + marc_field: '008_/23' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7109' - marc_type: unimarc + marc_field: '008_/23' + marc_type: normarc sort: ~ suggestible: '' + type: '' + ff8-29: + label: ff8-29 + mappings: - facet: '' - marc_field: '7119' - marc_type: unimarc + marc_field: '008_/29' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '7129' - marc_type: unimarc + marc_field: '008_/29' + marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: '7169' + marc_field: 105a_/8 marc_type: unimarc sort: ~ suggestible: '' + type: '' + geographic-class: + label: geographic-class + mappings: - facet: '' - marc_field: '7209' - marc_type: unimarc + marc_field: '052' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: '7219' - marc_type: unimarc + type: '' + holdingbranch: + label: holdinglibrary + mappings: + - facet: '1' + marc_field: 952b + marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: '7229' - marc_type: unimarc + - facet: '1' + marc_field: 952b + marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: '7309' + marc_field: 995c marc_type: unimarc sort: ~ suggestible: '' - type: number - author: - label: author + type: string + homebranch: + label: homelibrary mappings: - facet: '1' - marc_field: 100a + marc_field: 952a marc_type: marc21 sort: ~ - suggestible: '1' + suggestible: '' - facet: '1' - marc_field: 110a - marc_type: marc21 + marc_field: 952a + marc_type: normarc sort: ~ - suggestible: '1' + suggestible: '' - facet: '1' - marc_field: 111a - marc_type: marc21 + marc_field: 995b + marc_type: unimarc sort: ~ - suggestible: '1' - - facet: 0 - marc_field: 245c + suggestible: '' + type: string + host-item: + label: host-item + mappings: + - facet: '' + marc_field: 773at marc_type: marc21 - sort: 0 - suggestible: 0 - - facet: 1 - marc_field: 700a + sort: ~ + suggestible: '' + type: '' + host-item-number: + label: host-item-number + mappings: + - facet: '' + marc_field: '7739' marc_type: marc21 - sort: 0 - suggestible: 1 - - facet: '1' - marc_field: 100a + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7739' marc_type: normarc sort: ~ - suggestible: '1' - - facet: '1' - marc_field: 110a + suggestible: '' + - facet: '' + marc_field: '4619' + marc_type: unimarc + sort: ~ + suggestible: '' + type: number + identifier-other: + label: identifier-other + mappings: + - facet: '' + marc_field: 024aa + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + identifier-publisher-for-music: + label: identifier-publisher-for-music + mappings: + - facet: '' + marc_field: '028' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + identifier-standard: + label: identifier-standard + mappings: + - facet: '' + marc_field: '010' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '011' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '015' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '017' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '018' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 020a + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 022a + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '010' marc_type: normarc sort: ~ - suggestible: '1' - - facet: '1' - marc_field: 111a + suggestible: '' + - facet: '' + marc_field: '015' marc_type: normarc sort: ~ - suggestible: '1' - - facet: 0 - marc_field: 245c + suggestible: '' + - facet: '' + marc_field: 020a marc_type: normarc - sort: 0 - suggestible: 0 - - facet: 1 - marc_field: 700a + sort: ~ + suggestible: '' + - facet: '' + marc_field: 022a marc_type: normarc - sort: 0 - suggestible: 1 - - facet: '1' - marc_field: 200f - marc_type: unimarc sort: ~ - suggestible: '1' - - facet: '1' - marc_field: 200g + suggestible: '' + - facet: '' + marc_field: 010az marc_type: unimarc sort: ~ - suggestible: '1' - - facet: 1 - marc_field: 700a - marc_type: unimarc - sort: 0 - suggestible: 1 - - facet: 0 - marc_field: '701' + suggestible: '' + - facet: '' + marc_field: 011ayz marc_type: unimarc - sort: 0 - suggestible: 0 - type: string - bgf-number: - label: bgf-number + sort: ~ + suggestible: '' + type: 'stdno' + index-term-genre: + label: index-term-genre mappings: - facet: '' - marc_field: '015' + marc_field: 655a marc_type: marc21 sort: ~ suggestible: '' + type: '' + index-term-uncontrolled: + label: index-term-uncontrolled + mappings: - facet: '' - marc_field: '015' - marc_type: normarc + marc_field: 653a + marc_type: marc21 sort: ~ suggestible: '' type: '' - bib-level: - label: bib-level + indexed-by: + label: indexed-by mappings: - facet: '' - marc_field: leader_/7 + marc_field: '510' marc_type: marc21 sort: ~ suggestible: '' + type: '' + interest-age-level: + label: interest-age-level + mappings: - facet: '' - marc_field: leader_/7 - marc_type: normarc + marc_field: 521a + marc_type: marc21 sort: ~ suggestible: '' type: '' - bio: - label: bio + interest-grade-level: + label: interest-grade-level mappings: - facet: '' - marc_field: 008_/34 + marc_field: 521a + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + isbn: + label: isbn + mappings: + - facet: '' + marc_field: 020a marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 008_/34 + marc_field: 020a marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: 105a_/12 + marc_field: 010az marc_type: unimarc sort: ~ suggestible: '' - type: '' - bnb-card-number: - label: bnb-card-number + type: 'isbn' + issn: + label: issn mappings: - facet: '' - marc_field: '015' + marc_field: 022a marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '015' + marc_field: 022a marc_type: normarc sort: ~ suggestible: '' - type: '' - ccode: - label: collection-code + - facet: '' + marc_field: 011ayz + marc_type: unimarc + sort: ~ + suggestible: '' + type: 'stdno' + issues: + label: issues mappings: - - facet: '1' - marc_field: '9528' - marc_type: marc21 - sort: ~ - suggestible: '' - - facet: '1' - marc_field: '9528' - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '1' - marc_field: '9958' - marc_type: unimarc - sort: ~ - suggestible: '' - type: '' - control-number: - label: control-number + - facet: '' + marc_field: 952l + marc_type: marc21 + sort: 1 + suggestible: '' + - facet: '' + marc_field: 952l + marc_type: normarc + sort: 1 + suggestible: '' + type: sum + itemnumber: + label: itemnumber mappings: - facet: '' - marc_field: '001' + marc_field: '9529' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '001' + marc_field: '9529' marc_type: normarc sort: ~ suggestible: '' + - facet: '' + marc_field: '9959' + marc_type: unimarc + sort: ~ + suggestible: '' + type: number + itemtype: + label: itemtype + mappings: + - facet: '' + marc_field: 942c + marc_type: marc21 + sort: ~ + suggestible: '' type: '' - copydate: - label: copydate + itype: + label: itype mappings: - facet: '1' - marc_field: 260c + marc_field: 942c + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 952y + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 942c + marc_type: normarc + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 952y + marc_type: normarc + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 200b + marc_type: unimarc + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 995r + marc_type: unimarc + sort: ~ + suggestible: '' + type: string + koha-auth-number: + label: koha-auth-number + mappings: + - facet: '' + marc_field: '1009' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '1109' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '1119' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '1309' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '2459' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '4009' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '4109' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '4409' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '4909' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6009' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6109' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6119' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6309' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6489' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6509' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6519' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6529' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6539' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6549' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6559' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6569' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6579' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6629' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6909' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6919' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6969' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6979' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6989' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '6999' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7009' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7109' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7119' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7309' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7519' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7969' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7979' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7989' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '7999' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '8009' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '8109' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '8119' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '8309' marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 260c - marc_type: normarc + - facet: '' + marc_field: '8969' + marc_type: marc21 sort: ~ suggestible: '' - type: date - ctype: - label: ctype - mappings: - facet: '' - marc_field: 008_/24-27 + marc_field: '8979' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 008_/24-27 - marc_type: normarc + marc_field: '8989' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 105a_/4-7 - marc_type: unimarc + marc_field: '8999' + marc_type: marc21 sort: ~ suggestible: '' type: '' - date-entered-on-file: - label: date-entered-on-file + language-original: + label: language-original mappings: - facet: '' - marc_field: 008_/1-5 + marc_field: 041h marc_type: marc21 sort: ~ suggestible: '' + type: '' + lc-call-number: + label: lc-call-number + mappings: - facet: '' - marc_field: 008_/1-5 - marc_type: normarc + marc_field: 050b + marc_type: marc21 sort: ~ suggestible: '' + type: '' + lc-card-number: + label: lc-card-number + mappings: - facet: '' - marc_field: 099c - marc_type: unimarc + marc_field: '010' + marc_type: marc21 sort: ~ suggestible: '' - type: '' - date-time-last-modified: - label: date-time-last-modified - mappings: - facet: '' - marc_field: '005' + marc_field: '011' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 099d + marc_field: '010' + marc_type: normarc + sort: ~ + suggestible: '' + - facet: '' + marc_field: 995j marc_type: unimarc sort: ~ suggestible: '' type: '' - ff7-00: - label: ff7-00 + lexile-number: + label: lexile-number mappings: - facet: '' - marc_field: 007_/1 + marc_field: 521a marc_type: marc21 sort: ~ suggestible: '' - - facet: '' - marc_field: 007_/1 - marc_type: normarc - sort: ~ - suggestible: '' type: '' - ff7-01: - label: ff7-01 + lf: + label: lf mappings: - facet: '' - marc_field: 007_/2 + marc_field: '008_/33' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 007_/2 + marc_field: '008_/33' marc_type: normarc sort: ~ suggestible: '' + - facet: '' + marc_field: 105a_/11 + marc_type: unimarc + sort: ~ + suggestible: '' type: '' - ff7-01-02: - label: ff7-01-02 + llength: + label: llength mappings: - facet: '' - marc_field: 007_/1-2 + marc_field: leader_/1-5 marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 007_/1-2 + marc_field: leader_/1-5 marc_type: normarc sort: ~ suggestible: '' type: '' - ff7-02: - label: ff7-02 + ln: + label: ln mappings: - facet: '' - marc_field: 007_/3 + marc_field: '008_/35-37' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 007_/3 + marc_field: '008_/35-37' marc_type: normarc sort: ~ suggestible: '' + - facet: '' + marc_field: 101a + marc_type: unimarc + sort: ~ + suggestible: '' type: '' - ff8-23: - label: ff8-23 + ln-audio: + label: ln-audio mappings: - facet: '' - marc_field: 008_/23 + marc_field: 041a marc_type: marc21 sort: ~ suggestible: '' + type: '' + ln-subtitle: + label: ln-subtitle + mappings: - facet: '' - marc_field: 008_/23 - marc_type: normarc + marc_field: 041j + marc_type: marc21 sort: ~ suggestible: '' type: '' - ff8-29: - label: ff8-29 + local-classification: + label: local-classification mappings: - facet: '' - marc_field: 008_/29 + marc_field: 952o marc_type: marc21 sort: ~ - suggestible: '' + suggestible: '1' - facet: '' - marc_field: 008_/29 + marc_field: 952o marc_type: normarc sort: ~ - suggestible: '' + suggestible: '1' - facet: '' - marc_field: 105a_/8 + marc_field: '686' marc_type: unimarc sort: ~ suggestible: '' + - facet: '' + marc_field: 995k + marc_type: unimarc + sort: ~ + suggestible: '1' type: '' - holdingbranch: - label: HoldingLibrary + local-number: + label: local-number mappings: - - facet: '1' - marc_field: 952b + - facet: '' + marc_field: 999c marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 952b + - facet: '' + marc_field: 999c marc_type: normarc sort: ~ suggestible: '' - facet: '' - marc_field: 995c + marc_field: '001' marc_type: unimarc sort: ~ suggestible: '' type: string - homebranch: - label: HomeLibrary + location: + label: location mappings: - facet: '1' - marc_field: 952a + marc_field: 952c marc_type: marc21 sort: ~ suggestible: '' - facet: '1' - marc_field: 952a + marc_field: 952c marc_type: normarc sort: ~ suggestible: '' - facet: '1' - marc_field: 995b + marc_field: 995e marc_type: unimarc sort: ~ suggestible: '' - type: string - identifier-standard: - label: identifier-standard + type: '' + lost: + label: lost mappings: - facet: '' - marc_field: '010' + marc_field: '9521' marc_type: marc21 sort: ~ suggestible: '' + type: '' + map-scale: + label: map-scale + mappings: - facet: '' - marc_field: '011' + marc_field: '034' marc_type: marc21 sort: ~ suggestible: '' + type: '' + material-type: + label: material-type + mappings: - facet: '' - marc_field: '015' + marc_field: '007' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '017' - marc_type: marc21 + marc_field: '007' + marc_type: normarc sort: ~ suggestible: '' + type: '' + materials-specified: + label: materials-specified + mappings: - facet: '' - marc_field: '018' + marc_field: '9523' marc_type: marc21 sort: ~ suggestible: '' + type: '' + microform-generation: + label: microform-generation + mappings: - facet: '' - marc_field: 020a + marc_field: 007_/11 marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 022a - marc_type: marc21 + marc_field: 007_/11 + marc_type: normarc sort: ~ suggestible: '' + type: '' + music-key: + label: music-key + mappings: - facet: '' - marc_field: '010' - marc_type: normarc + marc_field: 130r + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '015' - marc_type: normarc + marc_field: 240r + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 020a - marc_type: normarc + marc_field: 243r + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 022a - marc_type: normarc + marc_field: 630r + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 010az - marc_type: unimarc + marc_field: 700r + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 011ayz - marc_type: unimarc + marc_field: 730r + marc_type: marc21 sort: ~ suggestible: '' - type: 'stdno' - isbn: - label: isbn + type: '' + nal-call-number: + label: nal-call-number mappings: - facet: '' - marc_field: 020a + marc_field: '070' marc_type: marc21 sort: ~ suggestible: '' + type: '' + name: + label: name + mappings: - facet: '' - marc_field: 020a - marc_type: normarc + marc_field: '100' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 010az - marc_type: unimarc + marc_field: '110' + marc_type: marc21 sort: ~ suggestible: '' - type: 'isbn' - issn: - label: issn - mappings: - facet: '' - marc_field: 022a + marc_field: '111' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 022a - marc_type: normarc + marc_field: '400' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 011ayz - marc_type: unimarc + marc_field: 600a + marc_type: marc21 sort: ~ suggestible: '' - type: 'stdno' - issues: - label: issues - mappings: - facet: '' - marc_field: 952l + marc_field: '610' marc_type: marc21 - sort: 1 + sort: ~ suggestible: '' - facet: '' - marc_field: 952l - marc_type: normarc - sort: 1 + marc_field: '611' + marc_type: marc21 + sort: ~ suggestible: '' - type: sum - itemnumber: - label: itemnumber - mappings: - facet: '' - marc_field: '9529' + marc_field: '700' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '9529' - marc_type: normarc + marc_field: '710' + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '9959' - marc_type: unimarc + marc_field: '711' + marc_type: marc21 sort: ~ suggestible: '' - type: number - itype: - label: itype - mappings: - - facet: '1' - marc_field: 942c + - facet: '' + marc_field: '800' marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 952y + - facet: '' + marc_field: '810' marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 942c - marc_type: normarc + - facet: '' + marc_field: '811' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 952y - marc_type: normarc + type: '' + name-and-title: + label: name-and-title + mappings: + - facet: '' + marc_field: '100' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 200b - marc_type: unimarc + - facet: '' + marc_field: '110' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 995r - marc_type: unimarc + - facet: '' + marc_field: '111' + marc_type: marc21 sort: ~ - suggestible: '' - type: string - lc-cardnumber: - label: lc-cardnumber - mappings: + suggestible: '' - facet: '' - marc_field: '010' + marc_field: 400at marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '011' + marc_field: 410a marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '010' - marc_type: normarc + marc_field: 411a + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 995j - marc_type: unimarc + marc_field: 600at + marc_type: marc21 sort: ~ suggestible: '' - type: '' - lf: - label: lf - mappings: - facet: '' - marc_field: 008_/33 + marc_field: 610at marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 008_/33 - marc_type: normarc + marc_field: 611at + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 105a_/11 - marc_type: unimarc + marc_field: 700t + marc_type: marc21 sort: ~ suggestible: '' - type: '' - llength: - label: llength - mappings: - facet: '' - marc_field: leader_/1-5 + marc_field: 710at marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: leader_/1-5 - marc_type: normarc + marc_field: 711a + marc_type: marc21 sort: ~ suggestible: '' - type: '' - ln: - label: ln - mappings: - facet: '' - marc_field: 008_/35-37 + marc_field: 800at marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 008_/35-37 - marc_type: normarc + marc_field: 810at + marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 101a - marc_type: unimarc + marc_field: 811at + marc_type: marc21 sort: ~ suggestible: '' type: '' - local-classification: - label: local-classification + name-geographic: + label: name-geographic mappings: - facet: '' - marc_field: 952o + marc_field: '651' marc_type: marc21 sort: ~ - suggestible: '1' - - facet: '' - marc_field: 952o - marc_type: normarc - sort: ~ - suggestible: '1' - - facet: '' - marc_field: '686' - marc_type: unimarc - sort: ~ suggestible: '' - facet: '' - marc_field: 995k - marc_type: unimarc + marc_field: 751a + marc_type: marc21 sort: ~ - suggestible: '1' + suggestible: '' type: '' - location: - label: Location + nlm-call-number: + label: nlm-call-number mappings: - - facet: '1' - marc_field: 952c + - facet: '' + marc_field: '060' marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 952c - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '1' - marc_field: 995e - marc_type: unimarc + type: '' + not-onloan-count: + label: not-onloan-count + mappings: + - facet: '' + marc_field: 999x + marc_type: marc21 sort: ~ suggestible: '' type: '' - material-type: - label: material-type + note: + label: note mappings: - facet: '' - marc_field: '007' + marc_field: '500' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: '007' - marc_type: normarc + marc_field: '505' + marc_type: marc21 sort: ~ suggestible: '' - type: '' - microform-generation: - label: microform-generation - mappings: - facet: '' - marc_field: 007_/11 + marc_field: '590' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 007_/11 - marc_type: normarc + marc_field: 952z + marc_type: marc21 sort: ~ suggestible: '' type: '' @@ -2449,6 +3023,15 @@ biblios: sort: ~ suggestible: '' type: '' + number-govt-pub: + label: number-govt-pub + mappings: + - facet: '' + marc_field: '086' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' number-legal-deposit: label: number-legal-deposit mappings: @@ -2458,6 +3041,15 @@ biblios: sort: ~ suggestible: '' type: '' + number-local-acquisition: + label: number-local-acquisition + mappings: + - facet: '' + marc_field: 952i + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' number-natl-biblio: label: number-natl-biblio mappings: @@ -2491,39 +3083,81 @@ biblios: sort: ~ suggestible: '' type: boolean + other-control-number: + label: other-control-number + mappings: + - facet: '' + marc_field: '035' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + personal-name: + label: personal-name + mappings: + - facet: '' + marc_field: '100' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '400' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 600a + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '700' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '800' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' pl: label: pl mappings: - facet: '' - marc_field: 008_/15-17 + marc_field: '008_/15-17' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 008_/15-17 + marc_field: '008_/15-17' marc_type: normarc sort: ~ suggestible: '' type: '' - place: - label: place + price: + label: price mappings: - - facet: '1' - marc_field: 260a + - facet: '' + marc_field: 952g marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 260a - marc_type: normarc + type: '' + provider: + label: provider + mappings: + - facet: '' + marc_field: '260' + marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 210a - marc_type: unimarc + - facet: '' + marc_field: '264' + marc_type: marc21 sort: ~ suggestible: '' - type: string + type: '' pubdate: label: pubdate mappings: @@ -2561,18 +3195,174 @@ biblios: marc_type: unimarc sort: ~ suggestible: '' - type: string - record-source: - label: record-source + type: string + reading-grade-level: + label: reading-grade-level + mappings: + - facet: '' + marc_field: 521a + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + record-control-number: + label: record-control-number + mappings: + - facet: '' + marc_field: 770w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 772w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 773w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 774w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 775w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 776w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 777w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 780w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 785w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 787w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 800w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 810w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 811w + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 830w + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + record-source: + label: record-source + mappings: + - facet: '' + marc_field: '008_/39' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '008_/39' + marc_type: normarc + sort: ~ + suggestible: '' + type: '' + related-periodical: + label: related-periodical + mappings: + - facet: '' + marc_field: '247' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '780' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '785' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + renewals: + label: renewals + mappings: + - facet: '' + marc_field: 952m + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + replacementprice: + label: replacementprice + mappings: + - facet: '' + marc_field: 952v + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + replacementpricedate: + label: replacementpricedate + mappings: + - facet: '' + marc_field: 952w + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + report-number: + label: report-number + mappings: + - facet: '' + marc_field: '027' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + reserves: + label: reserves mappings: - facet: '' - marc_field: 008_/39 + marc_field: 952n marc_type: marc21 sort: ~ suggestible: '' + type: '' + restricted: + label: restricted + mappings: - facet: '' - marc_field: 008_/39 - marc_type: normarc + marc_field: '9525' + marc_type: marc21 sort: ~ suggestible: '' type: '' @@ -2590,54 +3380,24 @@ biblios: sort: ~ suggestible: '' type: '' - se: - label: se + stack: + label: stack mappings: - - facet: '1' - marc_field: 440a - marc_type: marc21 - sort: ~ - suggestible: '' - - facet: '1' - marc_field: 490a + - facet: '' + marc_field: 952j marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 440a - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '1' - marc_field: 490a - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '1' - marc_field: 225a - marc_type: unimarc - sort: ~ - suggestible: '' - type: string - su-geo: - label: su-geo + type: '' + stock-number: + label: stock-number mappings: - - facet: '1' - marc_field: 651a + - facet: '' + marc_field: '037' marc_type: marc21 sort: ~ suggestible: '' - - facet: '1' - marc_field: 651a - marc_type: normarc - sort: ~ - suggestible: '' - - facet: '1' - marc_field: 607a - marc_type: unimarc - sort: ~ - suggestible: '' - type: string + type: '' subject: label: subject mappings: @@ -2862,6 +3622,15 @@ biblios: sort: ~ suggestible: '1' type: string + subject-name-personal: + label: subject-name-personal + mappings: + - facet: '' + marc_field: 600a + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' suppress: label: suppress mappings: @@ -2885,12 +3654,12 @@ biblios: label: ta mappings: - facet: '' - marc_field: 008_/22 + marc_field: '008_/22' marc_type: marc21 sort: ~ suggestible: '' - facet: '' - marc_field: 008_/22 + marc_field: '008_/22' marc_type: normarc sort: ~ suggestible: '' @@ -2900,6 +3669,40 @@ biblios: sort: ~ suggestible: '' type: '' + thematic-number: + label: thematic-number + mappings: + - facet: '' + marc_field: 130n + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 240n + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 243n + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 630n + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 700n + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 730n + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' title: label: title mappings: @@ -3364,3 +4167,209 @@ biblios: sort: ~ suggestible: '' type: string + title-abbreviated: + label: title-abbreviated + mappings: + - facet: '' + marc_field: '210' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '211' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '246' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-collective: + label: title-collective + mappings: + - facet: '' + marc_field: '243' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-cover: + label: title-cover + mappings: + - facet: '' + marc_field: 245a + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-expanded: + label: title-expanded + mappings: + - facet: '' + marc_field: '214' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '246' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-former: + label: title-former + mappings: + - facet: '' + marc_field: '246' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '247' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '780' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-key: + label: title-key + mappings: + - facet: '' + marc_field: '222' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-later: + label: title-later + mappings: + - facet: '' + marc_field: '785' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-other-variant: + label: title-other-variant + mappings: + - facet: '' + marc_field: '212' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '247' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '740' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + title-series: + label: title-series + mappings: + - facet: '1' + marc_field: 440a + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 490a + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 440a + marc_type: normarc + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 490a + marc_type: normarc + sort: ~ + suggestible: '' + - facet: '1' + marc_field: 225a + marc_type: unimarc + sort: ~ + suggestible: '' + type: string + title-uniform: + label: title-uniform + mappings: + - facet: '' + marc_field: '130' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '240' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: '730' + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 700t + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 710t + marc_type: marc21 + sort: ~ + suggestible: '' + - facet: '' + marc_field: 711t + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + totalissues: + label: totalissues + mappings: + - facet: '' + marc_field: '9420' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + udc-classification: + label: udc-classification + mappings: + - facet: '' + marc_field: '080' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + uri: + label: uri + mappings: + - facet: '' + marc_field: 952u + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' + withdrawn: + label: withdrawn + mappings: + - facet: '' + marc_field: '9520' + marc_type: marc21 + sort: ~ + suggestible: '' + type: '' diff --git a/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql b/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql new file mode 100644 index 0000000000..3c825d64e6 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql @@ -0,0 +1,29 @@ +UPDATE `search_field` SET `name` = LOWER(name), `label` = LOWER(label); +UPDATE `search_field` SET `name` = 'date-of-publication', `label` = 'date-of-publication' WHERE `name` = 'pubdate'; +UPDATE `search_field` SET `name` = 'title-series', `label` = 'title-series' WHERE `name` = 'se'; +UPDATE `search_field` SET `name` = 'identifier-standard', `label` = 'identifier-standard' WHERE `name` = 'identifier-standard'; +UPDATE `search_field` SET `name` = 'author', `label` = 'author' WHERE `name` = 'author'; +UPDATE `search_field` SET `name` = 'control-number', `label` = 'control-number' WHERE `name` = 'control-number'; +UPDATE `search_field` SET `name` = 'place-of-publication', `label` = 'place-of-publication' WHERE `name` = 'place'; +UPDATE `search_field` SET `name` = 'date-of-acquisition', `label` = 'date-of-acquisition' WHERE `name` = 'acqdate'; +UPDATE `search_field` SET `name` = 'isbn', `label` = 'isbn' WHERE `name` = 'isbn'; +UPDATE `search_field` SET `name` = 'authority-number', `label` = 'authority-number' WHERE `name` = 'an'; +UPDATE `search_field` SET `name` = 'subject', `label` = 'subject' WHERE `name` = 'subject'; +UPDATE `search_field` SET `name` = 'publisher', `label` = 'publisher' WHERE `name` = 'publisher'; +UPDATE `search_field` SET `name` = 'record-source', `label` = 'record-source' WHERE `name` = 'record-source'; +UPDATE `search_field` SET `name` = 'title', `label` = 'title' WHERE `name` = 'title'; +UPDATE `search_field` SET `name` = 'local-classification', `label` = 'local-classification' WHERE `name` = 'local-classification'; +UPDATE `search_field` SET `name` = 'bib-level', `label` = 'bib-level' WHERE `name` = 'bib-level'; +UPDATE `search_field` SET `name` = 'microform-generation', `label` = 'microform-generation' WHERE `name` = 'microform-generation'; +UPDATE `search_field` SET `name` = 'material-type', `label` = 'material-type' WHERE `name` = 'material-type'; +UPDATE `search_field` SET `name` = 'bgf-number', `label` = 'bgf-number' WHERE `name` = 'bgf-number'; +UPDATE `search_field` SET `name` = 'number-db', `label` = 'number-db' WHERE `name` = 'number-db'; +UPDATE `search_field` SET `name` = 'number-natl-biblio', `label` = 'number-natl-biblio' WHERE `name` = 'number-natl-biblio'; +UPDATE `search_field` SET `name` = 'number-legal-deposit', `label` = 'number-legal-deposit' WHERE `name` = 'number-legal-deposit'; +UPDATE `search_field` SET `name` = 'issn', `label` = 'issn' WHERE `name` = 'issn'; +UPDATE `search_field` SET `name` = 'local-number', `label` = 'local-number' WHERE `name` = 'local-number'; +UPDATE `search_field` SET `name` = 'suppress', `label` = 'supress' WHERE `name` = 'suppress'; +UPDATE `search_field` SET `name` = 'bnb-card-number', `label` = 'bnb-card-number' WHERE `name` = 'bnb-card-number'; +UPDATE `search_field` SET `name` = 'date/time-last-modified', `label` = 'date/time-last-modified' WHERE `name` = 'date-time-last-modified'; +DELETE FROM `search_field` WHERE `name` = 'lc-cardnumber'; +DELETE FROM `search_marc_map` WHERE `id` NOT IN(SELECT `search_marc_map_id` FROM `search_marc_to_field`); diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t index 1a109c6a94..eaaebf25c2 100644 --- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t +++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t @@ -288,29 +288,29 @@ subtest 'build_query tests' => sub { ( undef, $query ) = $qb->build_query_compat( undef, ['Local-number:"123456"'] ); is( $query->{query}{query_string}{query}, - '(Local-number:"123456")', - "query of specific field including hyphen and quoted is not truncated" + '(local-number:"123456")', + "query of specific field including hyphen and quoted is not truncated, field name is converted to lower case" ); ( undef, $query ) = $qb->build_query_compat( undef, ['Local-number:123456'] ); is( $query->{query}{query_string}{query}, - '(Local-number:123456*)', - "query of specific field including hyphen and not quoted is truncated" + '(local-number:123456*)', + "query of specific field including hyphen and not quoted is truncated, field name is converted to lower case" ); ( undef, $query ) = $qb->build_query_compat( undef, ['Local-number.raw:123456'] ); is( $query->{query}{query_string}{query}, - '(Local-number.raw:123456*)', - "query of specific field including period and not quoted is truncated" + '(local-number.raw:123456*)', + "query of specific field including period and not quoted is truncated, field name is converted to lower case" ); ( undef, $query ) = $qb->build_query_compat( undef, ['Local-number.raw:"123456"'] ); is( $query->{query}{query_string}{query}, - '(Local-number.raw:"123456")', - "query of specific field including period and quoted is not truncated" + '(local-number.raw:"123456")', + "query of specific field including period and quoted is not truncated, field name is converted to lower case" ); ( undef, $query ) = $qb->build_query_compat( undef, ['J.R.R'] ); -- 2.39.5