Bugzilla – Attachment 90053 Details for
Bug 22924
Elasticsearch, SysPref FacetMaxCount don't show more than 10 facets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22924: Elasticsearch, show more than 10 facets
Bug-22924-Elasticsearch-show-more-than-10-facets.patch (text/plain), 1.77 KB, created by
Michal Denar
on 2019-05-23 18:59:46 UTC
(
hide
)
Description:
Bug 22924: Elasticsearch, show more than 10 facets
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2019-05-23 18:59:46 UTC
Size:
1.77 KB
patch
obsolete
>From de83a64c5e003d9b9973ecbf234258bf1dcd29a9 Mon Sep 17 00:00:00 2001 >From: Axel Amghar <axel.amghar@biblibre.com> >Date: Thu, 16 May 2019 15:33:20 +0200 >Subject: [PATCH] Bug 22924: Elasticsearch, show more than 10 facets > >To test: > >Without the patch: >- check if you have your SysPref SearchEngine with Elasticsearch as value, >- put your SysPref FacetMaxCount at 15, >- make the search "a" in the catalog, >- in Refine your search click on show more for authors, >- make sure there is no more than 10 facets dislpaying > >With the patch: >- apply the patch, >- make the same, >- make sure there is exactly 15 facets for authors. > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index a4b4e84cae..7015366a51 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -86,6 +86,13 @@ sub search { > my $params = $self->get_elasticsearch_params(); > # 20 is the default number of results per page > $query->{size} = $count || 20; >+ >+ $query->{aggregations}{author}{terms}{size} = $query->{aggregations}{ln}{terms}{size} = >+ $query->{aggregations}{ccode}{terms}{size} = $query->{aggregations}{'title-series'}{terms}{size} = >+ $query->{aggregations}{holdingbranch}{terms}{size} = $query->{aggregations}{itype}{terms}{size} = >+ $query->{aggregations}{subject}{terms}{size} = $query->{aggregations}{'su-geo'}{terms}{size} = >+ $query->{aggregations}{location}{terms}{size} = 50; >+ > # ES doesn't want pages, it wants a record to start from. > if (exists $options{offset}) { > $query->{from} = $options{offset}; >-- >2.11.0
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 22924
:
89852
|
90053
|
90341
|
90665
|
90903