Bug 24128

Summary: Add alias for biblionumber => local-number
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Searching - ElasticsearchAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: 1joynelson, andrew, jonathan.druart, lucas, martin.renvoize, mkstephens
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.01
Circulation function:
Attachments: Bug 24128: Add alias for biblionumber search
Bug 24128: Add alias for biblionumber search
Bug 24128: Add alias for biblionumber search

Description Nick Clemens (kidclamp) 2019-11-27 11:26:16 UTC
This was setup in zebra - it would be nice to preserve this functionality
Comment 1 Nick Clemens (kidclamp) 2019-11-27 11:28:32 UTC
Created attachment 95846 [details] [review]
Bug 24128: Add alias for biblionumber search

To test:
1 - In staff or OPAC using ES, search for "biblionumber:3" or any existing biblionumber
2 - No results
3 - Apply patch, restart all the things
4 - Search again
5 - You go to the biblionumber
Comment 2 Myka Kennedy Stephens 2019-11-30 21:30:06 UTC
Patch does not apply.

What happened:
1 - searched for "biblionumber:19" (without double quotes)
2 - no results
3 - applied patch, restart_all, updatedatabase (just to be safe)
4 - search again
5 - 11 results: biblio numbers 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, and 199
Comment 3 Nick Clemens (kidclamp) 2019-12-02 11:27:51 UTC
Hi Myka,

This is due to the 'QueryAutoTruncate' system preference. This adds a wildcard to all searches if enabled.

Under ES if this is not enabled then partial word searches don't work - i.e. rain <> raining, so in general we do enable this

If you perform the search as a phrase you can workaround the truncation:
biblionumber:"19"
Comment 4 ByWater Sandboxes 2019-12-03 16:17:19 UTC
Created attachment 95953 [details] [review]
Bug 24128: Add alias for biblionumber search

To test:
1 - In staff or OPAC using ES, search for "biblionumber:3" or any existing biblionumber
2 - No results
3 - Apply patch, restart all the things
4 - Search again
5 - You go to the biblionumber

Signed-off-by:  Bob Bennhoff <bbennhoff@clicweb.org>
Comment 5 Jonathan Druart 2019-12-05 11:01:51 UTC
Created attachment 96008 [details] [review]
Bug 24128: Add alias for biblionumber search

To test:
1 - In staff or OPAC using ES, search for "biblionumber:3" or any existing biblionumber
2 - No results
3 - Apply patch, restart all the things
4 - Search again
5 - You go to the biblionumber

Signed-off-by:  Bob Bennhoff <bbennhoff@clicweb.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2019-12-05 11:02:13 UTC
Would be great to see this area covered by tests a bit more.
Comment 7 Martin Renvoize (ashimema) 2019-12-09 14:57:01 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2019-12-19 17:21:18 UTC
Pushed to 19.11.01
Comment 9 Lucas Gass (lukeg) 2019-12-20 17:02:20 UTC
backported to 19.05.x for 19.05.06