Bug 24128 - Add alias for biblionumber => local-number
Summary: Add alias for biblionumber => local-number
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-27 11:26 UTC by Nick Clemens
Modified: 2020-06-04 20:37 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.01


Attachments
Bug 24128: Add alias for biblionumber search (1.04 KB, patch)
2019-11-27 11:28 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 24128: Add alias for biblionumber search (1.10 KB, patch)
2019-12-03 16:17 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 24128: Add alias for biblionumber search (1.17 KB, patch)
2019-12-05 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-11-27 11:26:16 UTC
This was setup in zebra - it would be nice to preserve this functionality
Comment 1 Nick Clemens 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 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 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 2019-12-20 17:02:20 UTC
backported to 19.05.x for 19.05.06