From: Bill Erickson Date: Wed, 18 Sep 2019 21:44:56 +0000 (-0400) Subject: remove bib field primary key, not necessarily unique X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1f48ea22a0257376196ae27167cf0cccf4049795;p=working%2FEvergreen.git remove bib field primary key, not necessarily unique Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index cfdc6d35df..3943cbdf8e 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -12984,7 +12984,7 @@ SELECT usr, oils_persist:tablename="elastic.bib_field" reporter:label="Elastic Bib Index field" oils_persist:readonly="true"> - + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Elastic/Bib/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/Elastic/Bib/Search.pm index 7afd378bb4..7c7a8ce860 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Elastic/Bib/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Elastic/Bib/Search.pm @@ -211,7 +211,10 @@ sub create_index { } foreach qw/title subject series keyword/; } - my $fields = new_editor()->retrieve_all_elastic_bib_field(); + # elastic.bib_field has no primary key field, so retrieve_all won't work. + # Note the name value may be repeated across search group depending + # on local configuration. + my $fields = new_editor()->search_elastic_bib_field({name => {'!=' => undef}}); for my $field (@$fields) {