You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...otherwise for example Xapian indexing fails (lib/cfg.d/search_xapian.pl) - an arrayref gets passed to the TermGenerator when a scalar is expected.
Workaround:
diff --git a/lib/cfg.d/search_xapian.pl b/lib/cfg.d/search_xapian.pl
index b2a923f..2fa6ece 100644
--- a/lib/cfg.d/search_xapian.pl
+++ b/lib/cfg.d/search_xapian.pl
@@ -81,6 +81,7 @@ $c->add_trigger( EP_TRIGGER_INDEX_FIELDS, sub {
next if $field->isa( "EPrints::MetaField::Langid" );
next if $field->isa( "EPrints::MetaField::Subobject" );
next if $field->isa( "EPrints::MetaField::Storable" );
+ next if $field->is_virtual;
my $prefix = $field->name . ':';
my $value = $field->get_value( $dataobj );
@@ -97,7 +98,7 @@ $c->add_trigger( EP_TRIGGER_INDEX_FIELDS, sub {
$value = $v;
}
next if !EPrints::Utils::is_set( $value );
- $tg->index_text( $value );
+ $tg->index_text( $value ); # or this will choke on virtual fields that have an arrayref value
$tg->increase_termpos();
next if length($value) > 200; # Xapian term length limit-ish
if( $field->isa( "EPrints::MetaField::Text" ) || $field->isa( "EPrints::MetaField::Name" ) )
The text was updated successfully, but these errors were encountered:
...otherwise for example Xapian indexing fails (lib/cfg.d/search_xapian.pl) - an arrayref gets passed to the TermGenerator when a scalar is expected.
Workaround:
The text was updated successfully, but these errors were encountered: