Bug 19485 - Limiting by title-series (se) broken on ES
Summary: Limiting by title-series (se) broken on ES
Status: RESOLVED DUPLICATE of bug 19575
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: David Bourgault
QA Contact:
Depends on:
Reported: 2017-10-18 14:54 UTC by David Bourgault
Modified: 2017-11-17 19:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:

Bug 19485 - Don't transform se: limit for ES (1.39 KB, patch)
2017-10-18 15:07 UTC, David Bourgault
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Bourgault 2017-10-18 14:54:17 UTC
When filtering/limiting search results by Series title, the limit field name passed to ES is 'title-series' but it expects 'se', causing no results to be found.

This is particularly confusing as the page URL clearly says limit=se:XYZ.
Comment 1 David Bourgault 2017-10-18 15:07:04 UTC
Created attachment 68260 [details] [review]
Bug 19485 - Don't transform se: limit for ES

This removes the field name conversion for the Series title. Before it would transform 'se' into 'title-series', now in won't since ES indexes as 'se' by default.

0) Create a record with a "Series title" tag (440$a or 490$a in MARC21)
1) In the OPAC, do a search which would include the record from step 0)
2) In the left facet selection, click on the series title.
<==== Without patch
3) No results will be shown, the breadcrumbs show the limit as 'title-series'
====> With patch applied
3) Results will show correctly, breadcrumbs show the limit as 'se'
Comment 2 Katrin Fischer 2017-10-28 12:48:53 UTC
I finally got Elasticsearch working but seem to be missing the mappings - facets are not showing and the administration page is empty. Can you help me with a hint?
Comment 3 David Bourgault 2017-11-03 19:54:37 UTC
The mappings are supposed to be located in admin/searchengine/elasticsearch/mappings.yaml
Comment 4 Nick Clemens 2017-11-17 15:00:15 UTC
This works, but I am not sure it is the best solution - bug 19575 fixes things the other way, providing a friendlier name to the index - can you think of benefits to ths approach over the other?
Comment 5 David Bourgault 2017-11-17 19:25:50 UTC
>can you think of benefits to ths approach over the other?

No I can't. David Gustafsson's approach is much better. I used my solution only because I wasn't confident enough with ES to make big changes. 

I'm not sure what the correct status is, I'll set it to RESOLVED DUPLICATE.

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