From e9dce567ff2a6a52a07e8f7ce61e834d72c9a63f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 18 Sep 2019 17:44:56 -0400 Subject: [PATCH] remove bib field primary key, not necessarily unique Signed-off-by: Bill Erickson --- Open-ILS/examples/fm_IDL.xml | 2 +- Open-ILS/src/perlmods/lib/OpenILS/Elastic/Bib/Search.pm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 0eee8831cb..94a3e12385 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) { -- 2.11.0