https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18235

--- Comment #51 from Josef Moravec <josef.mora...@gmail.com> ---
Comment on attachment 85212
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85212
Bug 18235: ES - Facets configurable

Review of attachment 85212:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18235&attachment=85212)
-----------------------------------------------------------------

::: Koha/SearchEngine/Elasticsearch.pm
@@ +971,5 @@
> +    my @faceted_fields = Koha::SearchFields->search(
> +        { name => { -in => \@search_field_names }, facet_order => { '!=' => 
> undef } }, { order_by => ['facet_order'] }
> +    );
> +    my @not_faceted_fields = Koha::SearchFields->search(
> +        { name => { -in => \@search_field_names }, facet_order => undef }, { 
> order_by => ['facet_order'] }

Why do you retrieve fields from database in 2 queries, you always use them all.

::: admin/searchengine/elasticsearch/mappings.pl
@@ +215,4 @@
>      push @all_search_fields, $search_field_unblessed;
>  }
>  
> +my @facetable_fields = 
> Koha::SearchEngine::Elasticsearch->get_facetable_fields();

get_facetable_fields is called 3 or 4 times every run of mappings.pl.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to