Bugzilla – Attachment 68948 Details for
Bug 19581
Elasticsearch - Catmandu split option adds extra null fields to indexes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19581: Remove 'split' option from Catmandu fixes for marc
Bug-19581-Remove-split-option-from-Catmandu-fixes-.patch (text/plain), 1.69 KB, created by
Nick Clemens (kidclamp)
on 2017-11-05 02:03:19 UTC
(
hide
)
Description:
Bug 19581: Remove 'split' option from Catmandu fixes for marc
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-11-05 02:03:19 UTC
Size:
1.69 KB
patch
obsolete
>From 4aca9ba819c5f91c72dcc8c747d33166caf3a8c0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sun, 5 Nov 2017 01:51:39 +0000 >Subject: [PATCH] Bug 19581: Remove 'split' option from Catmandu fixes for marc > >This option in combination with append seems to add null entries in the indexes >for fields that don't exist. These fields then affect sorting. Removing it solves >the issue > >To test: >1 - Have an ES setup >2 - Catalog and index some records >3 - View a record in ES: > curl 'localhost:9200/koha_kohadev_biblios/data/4?pretty=yes' >4 - Note there are 'null' entries in the indexes, save this result for >comparison >5 - Apply patch >6 - Reindex, amking sure to delete existing indexes > perl misc/search_tools/rebuild_elastic_search.pl -d >7 - View the record again >8 - Note the null entries are removed >9 - Note indices are otherwise intact >--- > Koha/SearchEngine/Elasticsearch.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index fb533b8..d784663 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -328,7 +328,7 @@ sub get_fixer_rules { > # selects a range > # The split makes everything into nested arrays, but that's not > # really a big deal, ES doesn't mind. >- $options = '-split => 1' unless $marc_field =~ m|_/| || $type eq 'sum'; >+ $options = '' unless $marc_field =~ m|_/| || $type eq 'sum'; > push @rules, "marc_map('$marc_field','${name}.\$append', $options)"; > if ($facet) { > push @rules, "marc_map('$marc_field','${name}__facet.\$append', $options)"; >-- >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 19581
:
68947
|
68948
|
68949
|
69092
|
69093
|
72745
|
72767
|
72997
|
73864
|
73865
|
73866
|
73867
|
73896