Bug 5810 - Subject tracings should search complete subfields
Summary: Subject tracings should search complete subfields
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Target Milestone: ---
Assignee: Jared Camins-Esakov
QA Contact: Bugs List
Depends on:
Blocks: 5842
  Show dependency treegraph
Reported: 2011-02-24 13:32 UTC by Jared Camins-Esakov
Modified: 2012-10-25 23:03 UTC (History)
4 users (show)

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

patch (24.88 KB, patch)
2011-02-28 19:21 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Signed-off patch (27.88 KB, patch)
2011-03-08 17:13 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Revision to fix author search link, file 1 (23.64 KB, patch)
2011-03-08 18:01 UTC, Jane Wagner
Details | Diff | Splinter Review
Revision to fix author search link, file 2 (2.10 KB, patch)
2011-03-08 18:02 UTC, Jane Wagner
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2011-02-24 13:32:06 UTC
At the moment, if you are looking at a book about Religions (with a subject term "Religions") in the catalog of a library that does not use Koha's authority control, when you click on the subject tracing in the OPAC, you will be given a result set that contains every single record that has the word "Religions" anywhere in its subject. Including, for example, books with the subject "Christianity and other religions."

If we make the query on the subject tracings su,complete-subfield: the only false positives will be items where the subject heading being searched is used for both a main entry and a subdivision, which still seems like a significant improvement over the current behavior.

This should ideally be controlled by a syspref so those libraries which want the current behavior can keep it.
Comment 1 Jared Camins-Esakov 2011-02-24 13:32:54 UTC
Forgot to note- this is a problem on the Staff client, too.
Comment 2 Nicole C. Engard 2011-02-24 13:41:35 UTC
I was doing a training a few months ago and the librarians there loved the fact that it didn't do an exact match.  The reasoning made sense to me (but then again I was never a stickler for the rules when I was cataloging).  If you have a book with about the United States and a book that takes place in the United States the subject term "United States" will appear in different spots (with other possible identifiers). The way it searches now allows you to find all of those subjects.  Other examples include keywords like 'Juvenile' or 'Fiction' (just to name a few).  I like that the search chains the subjects together as keyword searches (on the subject) because then you get more than if you were limited only to that exact subject.

Further, if your library isn't using Authorities then it makes perfect sense that the search be flexible as it is now because there is no telling how two people cataloged two books on the same topics.  

This might need to be an authorities system preference that asks outright if the library uses authority control - and if so then you can make the search only search the full authority - otherwise I'd say it should stay the way it is.
Comment 3 Nicole C. Engard 2011-02-28 19:21:33 UTC Comment hidden (obsolete)
Comment 4 MJ Ray (software.coop) 2011-03-05 10:34:08 UTC
This bug is mentioned in:
Bug 5810: Subject tracings	search complete subfields http://lists.koha-community.org/pipermail/koha-patches/2011-February/013948.html
Comment 5 Jared Camins-Esakov 2011-03-08 17:13:24 UTC Comment hidden (obsolete)
Comment 6 Jane Wagner 2011-03-08 18:01:24 UTC
Created attachment 3270 [details] [review]
Revision to fix author search link, file 1
Comment 7 Jane Wagner 2011-03-08 18:02:41 UTC
Created attachment 3271 [details] [review]
Revision to fix author search link, file 2
Comment 8 Jane Wagner 2011-03-08 18:03:27 UTC
After testing and revising, this patch fixes the problem in Bug 5842 as well.
Comment 9 Jane Wagner 2011-03-08 18:07:05 UTC
Note that this patch does not solve what are probably similar problems with UNIMARC XSLT files, just the MARC21 files.  The UNIMARC files also use the code=9 construct for author and subject links, and this fix should probably be extended to those files.
Comment 10 Chris Cormack 2011-03-13 02:21:30 UTC
Pushed and merged, please test