Bug 19015

Summary: Searches fail with error Fielddata is disabled on text fields by default for elastic search 5.3 and 5.4
Product: Koha Reporter: david holoshka <david.holoshka>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P5 - low CC: claire.hernandez, david.bourgault, frank.hansen, jonathan.druart, nick
Version: Main   
Hardware: All   
OS: Linux   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description david holoshka 2017-08-01 12:53:14 UTC
There is a work around but it would save space and trouble if this was fixed.

[illegal_argument_exception] Fielddata is disabled on text fields by default. Set fielddata=true on [Heading.phrase] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead., called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /usr/local/share/perl/5.20.2/Catmandu/Store/ElasticSearch/Bag.pm line 168.
Comment 1 David Bourgault 2017-10-18 18:58:26 UTC
I've encountered the same issue with Elasticsearch 5.6. Testing 2 client databases, one worked fine, the other threw "fielddata is disabled" errors and failed to search (no results).
Comment 2 Nick Clemens (kidclamp) 2017-12-07 14:38:08 UTC
I believe this is generally related to the mappings and should be okay for now. Any sort field or facet I think need to be 'keyword' type rather than enabling fielddata