| Summary: | Elasticsearch QueryAutoTruncate truncate field names with hyphens if data is quoted | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> | 
| Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> | 
| Status: | CLOSED FIXED | QA Contact: | Julian Maurice <julian.maurice> | 
| Severity: | major | ||
| Priority: | P5 - low | CC: | david.bourgault, fridolin.somers, glasklas, jonathan.druart, julian.maurice, tomascohen | 
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 | 
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Bug Depends on: | 18374 | ||
| Bug Blocks: | 18131, 19580 | ||
| Attachments: | Bug 19559 - Unit tests Bug 19559 - Add '-' to list of characters we don't split search terms on Bug 19559 - Unit tests Bug 19559 - Add '-' to list of characters we don't split search terms on Bug 19559 - Unit tests Bug 19559 - Add '-' to list of characters we don't split search terms on | ||
| 
        
          Description
        
        
          Nick Clemens (kidclamp)
        
        
        
        
          2017-11-01 15:46:47 UTC
        
       Created attachment 68881 [details] [review] Bug 19559 - Unit tests Created attachment 68882 [details] [review] Bug 19559 - Add '-' to list of characters we don't split search terms on Test plan assumes QueryAutoTruncate = automatically SearchEngine = Elasticsearch To test: 0 - Apply Unit test patch only 1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 2 - Should fail 3 - Apply this patch 4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 5 - should pass 6 - search for 'Local-number:"4"' (or a vlid biblionumber) 7 - should get expected result *** Bug 19565 has been marked as a duplicate of this bug. *** Would be nice if "." could as be included as a valid field characters, since it is used for subfields in Elasticsearch. ("Control-number.raw" for example).Created attachment 68924 [details] [review] Bug 19559 - Unit tests Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Created attachment 68925 [details] [review] Bug 19559 - Add '-' to list of characters we don't split search terms on Test plan assumes QueryAutoTruncate = automatically SearchEngine = Elasticsearch To test: 0 - Apply Unit test patch only 1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 2 - Should fail 3 - Apply this patch 4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 5 - should pass 6 - search for 'Local-number:"4"' (or a vlid biblionumber) 7 - should get expected result Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Works as described in test plan. (In reply to David Gustafsson from comment #4) > Would be nice if "." could as be included as a valid field characters, since > it is used for subfields in Elasticsearch. ("Control-number.raw" for > example). This could be done, opening a new bug 19580 We may need more adjustments to when we do and do not truncate/split Created attachment 69075 [details] [review] Bug 19559 - Unit tests Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Created attachment 69076 [details] [review] Bug 19559 - Add '-' to list of characters we don't split search terms on Test plan assumes QueryAutoTruncate = automatically SearchEngine = Elasticsearch To test: 0 - Apply Unit test patch only 1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 2 - Should fail 3 - Apply this patch 4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 5 - should pass 6 - search for 'Local-number:"4"' (or a vlid biblionumber) 7 - should get expected result Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed to master for 17.11, thanks to everybody involved! Pushed to 17.05.x for v17.05.09 |