Bug 9395 - Problem with callnumber and standard number search in OPAC and Staff Client
Summary: Problem with callnumber and standard number search in OPAC and Staff Client
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P1 - high major (vote)
Assignee: Vitor Fernandes
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-15 16:36 UTC by Vitor Fernandes
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

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


Attachments
Bug 9395: Problem with callnumber and standard number search in OPAC and Staff Client (10.46 KB, patch)
2013-01-15 17:26 UTC, Vitor Fernandes
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9395: Problem with callnumber and standard number searches (10.67 KB, patch)
2013-02-05 16:25 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9395: Problem with callnumber and standard number searches (10.78 KB, patch)
2013-02-11 06:47 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Fernandes 2013-01-15 16:36:06 UTC
This problem happens because there isn't a operator "phr" in the values of callnumber and standard number search. So many results aren't the corrects ones.

For example if a search for a standard number "1" there isn't results even in OPAC and Staff Client. If the value is changed for "sn,phr" there is one result which is the biblionumber 1.

When searching in OPAC for callnumbers the results are accurated because it's searching for "lcn,phr" in the advanced search. In staff client are only looking for "callnum" which uses the operator wrdl.
Comment 1 Vitor Fernandes 2013-01-15 17:26:04 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2013-01-16 06:12:39 UTC
I question creating a new system preference in this case.  I think defaulting the system number and call number searches to phrase searches is preferable; can anybody articulate a use case for keeping the old behavior?
Comment 3 Vitor Fernandes 2013-01-16 10:03:23 UTC
Hi Galen,

For me the default behaviour should be searching with "phr" because it's the only way that I can obtain consistent results.

But when I asked this on the IRC and after talking with some persons there (jcamins, magnuse, etc), the idea was to maintain the default behaviour and introduce system preferences to allow searches with "phr".
Comment 4 Jared Camins-Esakov 2013-01-16 13:15:57 UTC
(In reply to comment #2)
> I question creating a new system preference in this case.  I think
> defaulting the system number and call number searches to phrase searches is
> preferable; can anybody articulate a use case for keeping the old behavior?

Yes. If we simply switch to using ,phr searching for only part of a multi-word call number will not work with GRS-1. For example, I have a library which has call numbers like "Letter Smith John." If someone remembers the call number as "Smith" so far as I can tell a callnum,phr search will not find it for GRS-1, and until GRS-1 is fully deprecated and removed, I am loath to break it.
Comment 5 Owen Leonard 2013-02-05 16:25:24 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2013-02-11 06:47:42 UTC
Created attachment 15217 [details] [review]
[SIGNED-OFF] Bug 9395: Problem with callnumber and standard number searches

This problem happens because there isn't a operator "phr" in the values
of callnumber and standard number search. So many results aren't the
corrects ones.

Test plan:

- Apply the patch
- In the dropbox search menu of OPAC main page header, the callnum
  should have only callnum
- In OPAC advanced search the callnumber and standard number options
  shouldn't have "phr"
- In staff client advanced search the callnumber and standard number
  options shouldn't have "phr"
- Change OPACNumbersPreferPhrase and IntranetNumbersPreferPhrase to "use"
- The options listed before should use now the operator "phr"
- This will resolve the problems with the searches of callnumbers and
  standard numbers in OPAC and staff client (spaces problems, no
  results, inconsistent results, etc...)

Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I don't know how to reproduce the searching problems described in the
bug, but I can confirm that the patch works correctly to enable/disable
the use of 'phr' in the searches described in the test plan.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
System preferences work as described, switching indexes in
OPAC and staff.
All tests and QA script pass.
Comment 7 Jared Camins-Esakov 2013-02-15 23:30:54 UTC
This patch has been pushed to master.
Comment 8 Chris Cormack 2013-02-26 09:17:26 UTC
Pushed to 3.10.x will be in 3.10.4