Bugzilla – Attachment 89852 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.71 KB, created by
axel Amghar
on 2019-05-16 14:54:52 UTC
(
hide
)
Description:
Bug 22924: Elasticsearch, show more than 10 facets
Filename:
MIME Type:
Creator:
axel Amghar
Created:
2019-05-16 14:54:52 UTC
Size:
1.71 KB
patch
obsolete
>From ee9345b656f8be2620689c2601e5a16cca3e1fc8 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. >--- > 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 4ac8d9d..699498b 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.7.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 22924
:
89852
|
90053
|
90341
|
90665
|
90903