@@ -, +, @@ from the ES results --- Koha/Patron.pm | 6 ++++++ misc/search_tools/reindex_patrons.pl | 1 + 2 files changed, 7 insertions(+) --- a/Koha/Patron.pm +++ a/Koha/Patron.pm @@ -48,6 +48,12 @@ Koha::Patron - Koha Patron Object class =cut +sub category { + my ( $self ) = @_; + my $category = $self->_result->categorycode; + return Koha::Patron::Category->_new_from_dbic( $category ); +} + =head3 delete $patron->delete --- a/misc/search_tools/reindex_patrons.pl +++ a/misc/search_tools/reindex_patrons.pl @@ -17,6 +17,7 @@ while ( my $patron = $patrons->next ) { my $id = $patron->borrowernumber; my $record = $patron->unblessed; $record->{_id} = $id; + $record->{category_type} = $patron->category->category_type; push @id_buffer, $id; push @commit_buffer, $record; } --