Bugzilla – Attachment 56870 Details for
Bug 17500
Use Elasticsearch to search for patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17500: Index category_type to make searchable and display from the ES results
Bug-17500-Index-categorytype-to-make-searchable-an.patch (text/plain), 1.26 KB, created by
Jonathan Druart
on 2016-10-26 13:23:13 UTC
(
hide
)
Description:
Bug 17500: Index category_type to make searchable and display from the ES results
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-10-26 13:23:13 UTC
Size:
1.26 KB
patch
obsolete
>From bd01b1d0df58384012b7162032515f80695f2afe Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 26 Oct 2016 12:47:35 +0200 >Subject: [PATCH] Bug 17500: Index category_type to make searchable and display > from the ES results > >--- > Koha/Patron.pm | 6 ++++++ > misc/search_tools/reindex_patrons.pl | 1 + > 2 files changed, 7 insertions(+) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 93c2186..cd4302a 100644 >--- a/Koha/Patron.pm >+++ b/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 >diff --git a/misc/search_tools/reindex_patrons.pl b/misc/search_tools/reindex_patrons.pl >index ed581b7..4d1b689 100644 >--- a/misc/search_tools/reindex_patrons.pl >+++ b/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; > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17500
:
56867
|
56868
|
56869
|
56870
|
56871
|
56872
|
61481
|
61482
|
61483
|
61484
|
61485
|
61486
|
61487