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.
Forgot to note- this is a problem on the Staff client, too.
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.
Created attachment 3226 [details] [review] patch
This bug is mentioned in: Bug 5810: Subject tracings search complete subfields http://lists.koha-community.org/pipermail/koha-patches/2011-February/013948.html
Created attachment 3269 [details] [review] Signed-off patch
Created attachment 3270 [details] [review] Revision to fix author search link, file 1
Created attachment 3271 [details] [review] Revision to fix author search link, file 2
After testing and revising, this patch fixes the problem in Bug 5842 as well.
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.
Pushed and merged, please test