Bug 14401 - Zebra index configuration doesn't allow exact search for 'C.'
Summary: Zebra index configuration doesn't allow exact search for 'C.'
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-17 10:31 UTC by Katrin Fischer
Modified: 2016-12-05 21:22 UTC (History)
5 users (show)

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


Attachments
Bug 14401: Zebra index configuration doesn't allow exact search for C. (1.49 KB, patch)
2015-06-17 12:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14401: Zebra index configuration doesn't allow exact search for C. (1.55 KB, patch)
2015-06-17 13:48 UTC, Indranil Das Gupta
Details | Diff | Splinter Review
[PASSED QA] Bug 14401: Zebra index configuration doesn't allow exact search for C. (1.64 KB, patch)
2015-06-19 14:54 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-06-17 10:31:44 UTC
This has been reported by a library that uses [A-Z]. for call numbers. Every character in the alphabet can be searched perfectly fine using callnum,ext:[A-Z]. - except for C.

After taking a look at the  /etc/zebradb/etc/word-phrase-utf.chr those 2 lines are to blame for the problem:

333 map (^c\.)          @
335 map (^C\.)          @

I propose to remove them.

To test:
- catalog a record with an item with callnumber: C.
- catalog a record with an item with callnumber: B.
- try seaching for the second using callnum,ext:B. (exact field search)
  - Verify search works.
- try searching for the other with callnum,ext:C.
  - Verify no result.
- apply the patch - copy the zebra config file if necessary into the right spot
- reindex
- repeat searches - both should not bring up the correct record.
Comment 1 Katrin Fischer 2015-06-17 12:51:56 UTC Comment hidden (obsolete)
Comment 2 Indranil Das Gupta 2015-06-17 13:48:31 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-06-19 14:54:30 UTC
Created attachment 40389 [details] [review]
[PASSED QA] Bug 14401: Zebra index configuration doesn't allow exact search for C.

2 lines in the Zebra configuration files prevent an exact search for C.,
while all other [A-Z]. searches work correctly.

After taking a look at the  /etc/zebradb/etc/word-phrase-utf.chr
those 2 lines cause the problem:

map (^c\.)          @
map (^C\.)          @

I propose to remove them.

To test:
- Catalog a record with an item with callnumber: C.
- Catalog a record with an item with callnumber: B.
- Try seaching for the second using callnum,ext:B. (exact field search)
  - Verify search works.
- Try searching for the other with callnum,ext:C.
  - Verify no result.
- Apply the patch - copy the zebra config file if necessary into the right spot
- Reindex
- Repeat searches - both should not bring up the correct record.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2015-06-22 14:44:45 UTC
Patch pushed to master.

Thanks Katrin!
Comment 5 Chris Cormack 2015-07-08 21:02:35 UTC
Pushed to 3.20.x will be in 3.20.2
Comment 6 Liz Rea 2015-07-20 22:11:22 UTC
Pushed to 3.18.x will be in 3.18.09
Comment 7 Mason James 2015-07-25 12:56:30 UTC
Pushed to 3.16.x, will be in 3.16.13