Bugzilla – Attachment 68705 Details for
Bug 16660
Elasticsearch broken if OpacSuppression is activated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16660: Add support for OpacSuppression to Elasticsearch
Bug-16660-Add-support-for-OpacSuppression-to-Elast.patch (text/plain), 2.14 KB, created by
Kyle M Hall (khall)
on 2017-10-27 13:34:15 UTC
(
hide
)
Description:
Bug 16660: Add support for OpacSuppression to Elasticsearch
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-10-27 13:34:15 UTC
Size:
2.14 KB
patch
obsolete
>From db8a5fbc650a6da8aec7452c3a69b18e550653bc Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Oct 2017 21:00:44 +0000 >Subject: [PATCH] Bug 16660: Add support for OpacSuppression to Elasticsearch > >To test: >1 - Enable suppression >2 - Suppress some records >3 - Apply all the patches >4 - Reindex ES >5 - Search and don't get suppressed records >6 - Disable suppression >7 - Search and get all the records > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 1 + > admin/searchengine/elasticsearch/mappings.yaml | 19 +++++++++++++++++++ > 2 files changed, 20 insertions(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 7092e0f..cdd0fc6 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -204,6 +204,7 @@ sub build_query_compat { > my @sort_params = $self->_convert_sort_fields(@$sort_by); > my @index_params = $self->_convert_index_fields(@$indexes); > my $limits = $self->_fix_limit_special_cases($orig_limits); >+ if ( $params->{suppress} ) { push @$limits, "suppress:0"; } > > # Merge the indexes in with the search terms and the operands so that > # each search thing is a handy unit. >diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml >index f01fd01..4c16489 100644 >--- a/admin/searchengine/elasticsearch/mappings.yaml >+++ b/admin/searchengine/elasticsearch/mappings.yaml >@@ -2248,6 +2248,25 @@ biblios: > sort: ~ > suggestible: '1' > type: string >+ suppress: >+ label: suppress >+ mappings: >+ - facet: '' >+ marc_field: 942n >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: 942n >+ marc_type: normarc >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: 955n >+ marc_type: unimarc >+ sort: ~ >+ suggestible: '' >+ type: boolean > ta: > label: ta > mappings: >-- >2.10.2
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 16660
:
60727
|
68224
|
68280
|
68320
|
68321
|
68322
|
68704
| 68705 |
68706