From 1c4543fe091c40745c59648b3b2e3925f0321263 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Mon, 22 Oct 2018 16:52:18 +0200 Subject: [PATCH] Bug 19893: Fixed some typos --- Koha/SearchEngine/Elasticsearch.pm | 6 +++--- Koha/SearchEngine/Elasticsearch/Indexer.pm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 3719f8961d..2e21e969da 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -314,7 +314,7 @@ sub sort_fields { my @record_documents = $self->marc_records_to_documents($marc_records); -Using mappings stored in databse convert C<$marc_records> to ElasticSearch documents. +Using mappings stored in database convert C<$marc_records> to ElasticSearch documents. Returns array of hash references, representing ElasticSearch documents, acceptable as body payload in C requests. @@ -457,14 +457,14 @@ sub marc_records_to_documents { my $mapping_rules = $self->_get_marc_mapping_rules() -Generates rules from mappings stored in databse for MARC records to Elasticsearch JSON document conversion. +Generates rules from mappings stored in database for MARC records to Elasticsearch JSON document conversion. Since field retrieval is slow in C (all fields are itereted through for each call to C->field) we create an optimized structure of mapping rules keyed by MARC field tags holding all the mapping rules for that particular tag. We can then iterate through all MARC fields for each record and apply all relevant -rules once per fields instead of retreiving field multiple times for each mapping rule +rules once per fields instead of retreiving fields multiple times for each mapping rule wich is terribly slow. =cut diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm index 4646e0b94f..9836d3e9cc 100644 --- a/Koha/SearchEngine/Elasticsearch/Indexer.pm +++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm @@ -81,7 +81,7 @@ use constant { die("Something whent wrong trying to update index:" . $_[0]); } -Converts C C<$records> to Elasticsearch documents and perform +Converts C C<$records> to Elasticsearch documents and performs an update request for these records on the Elasticsearch index. The values in the arrays must match up, and the 999$c value in the MARC record @@ -96,8 +96,8 @@ If that's a problem, clone them first. =item C<$biblionums> -Arrayref of biblio numbers for the C<$records>, the order must be the same -as C<$records>. +Arrayref of biblio numbers for the C<$records>, the order must be the same as +and match up with C<$records>. =item C<$records> -- 2.11.0