Bug 18610 - ElasticSearch indexing of facets needs to be updated for newer Catmandu versions
Summary: ElasticSearch indexing of facets needs to be updated for newer Catmandu versions
Status: RESOLVED DUPLICATE of bug 18434
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on: 18434
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-15 14:48 UTC by Nick Clemens (kidclamp)
Modified: 2017-07-03 19:09 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 18610: regression tests (8.90 KB, patch)
2017-05-15 15:17 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 18610: Make facet indexing append instead of overwrite so it works on newer Catmandu (1.49 KB, patch)
2017-05-15 15:17 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2017-05-15 14:48:51 UTC
This is analogous to the problem on bug 18434 - in newer versions multiple mappings overwrite each other if not set to append. Bug 18434 takes care of main headings, facets need the same treatment and testing
Comment 1 Tomás Cohen Arazi (tcohen) 2017-05-15 15:17:11 UTC
Created attachment 63480 [details] [review]
Bug 18610: regression tests

This patch introduces tests fr K::SE::ES::Indexer::_convert_marc_to_json
to test the facets that get extracted from the sample record.

To test:
- Run
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t \
          t/db_dependent/Koha_Elasticsearch.t
=> FAIL: Test fails because only last field mapped for facetting is considered (overwrite behaviour).

Sponsored-by: ByWater Solutions
Comment 2 Tomás Cohen Arazi (tcohen) 2017-05-15 15:17:21 UTC
Created attachment 63481 [details] [review]
Bug 18610: Make facet indexing append instead of overwrite so it works on newer Catmandu

This patch makes get_fixer_rules add the $append string to the facets mapping as we did for
bug 18434.

To test:
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t t/db_dependent/Koha_Elasticsearch.t
=> FAIL: Tests fail!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t t/db_dependent/Koha_Elasticsearch.t
=> SUCCESS: Tests are all green!
- Sign off :-D

Sponsored-by: ByWater Solutions
Comment 3 Tomás Cohen Arazi (tcohen) 2017-07-03 19:09:14 UTC

*** This bug has been marked as a duplicate of bug 18434 ***