Bugzilla – Attachment 106276 Details for
Bug 25873
Elasticsearch - Records with malformed data are not indexed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25873: Ignore malformed data for Elasticsearch integer fields
Bug-25873-Ignore-malformed-data-for-Elasticsearch-.patch (text/plain), 1.43 KB, created by
Julian Maurice
on 2020-06-25 07:42:22 UTC
(
hide
)
Description:
Bug 25873: Ignore malformed data for Elasticsearch integer fields
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-06-25 07:42:22 UTC
Size:
1.43 KB
patch
obsolete
>From 17a14d5f90c2e3d46e54d01ae2af2aa392c6f413 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 25 Jun 2020 11:25:41 +0400 >Subject: [PATCH] Bug 25873: Ignore malformed data for Elasticsearch integer > fields > >If we try to put malformed data into an integer field, Elasticsearch >rejects the whole document. >Setting 'ignore_malformed' to true allows to ignore malformed data and >process the other fields of the document normally > >https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ignore-malformed.html > >Test plan: >* Without the patch > 1. In search engine configuration, change the type of a text field to > 'Number' (for instance 'title') > 2. misc/search_tools/rebuild_elasticsearch.pl -d -b > 3. See that the index is empty (unless you have titles consisting only > of digits) >* With the patch > 1. misc/search_tools/rebuild_elasticsearch.pl -d -b > 2. Now records are correctly indexed >--- > admin/searchengine/elasticsearch/field_config.yaml | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/admin/searchengine/elasticsearch/field_config.yaml b/admin/searchengine/elasticsearch/field_config.yaml >index 8723a0713c..82793ff421 100644 >--- a/admin/searchengine/elasticsearch/field_config.yaml >+++ b/admin/searchengine/elasticsearch/field_config.yaml >@@ -24,6 +24,7 @@ search: > integer: > type: integer > null_value: 0 >+ ignore_malformed: true > stdno: > type: text > analyzer: analyzer_stdno >-- >2.20.1
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 25873
:
106276
|
106703