]> git.koha-community.org Git - koha.git/commit
Bug 8726: ExplodedTerms suggestion plugin (functionality)
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 14 Sep 2012 13:08:10 +0000 (09:08 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 28 Sep 2012 15:08:21 +0000 (17:08 +0200)
commitd2cd2e09aad85a44e2392ac8900320bf29a735be
tree8714ef9b63b9a2824a43059415dcc20becbf4724
parent35b7162adf130dda4087a3f69c7a570db77dee02
Bug 8726: ExplodedTerms suggestion plugin (functionality)

When working with hierarchical subject headings, it is sometimes helpful
to do a search for all records with a specific subject, plus
broader/narrower/related subjects. This patch adds a suggestion plugin for
these "exploded" subject searches to Koha. Note that this patch depends on
both bug 8211 AND bug 8209.

To test (NOTE: this test plan covers both 8211 and 8726):
1) Make sure you have a bunch of hierarchical subjects. I created
   geographical subjects for "Arizona," "United States," and "Phoenix,"
   and linked them together using 551s, and made sure I had a half
   dozen records linking to each (but not all to all three).
2) Do a search for su-br:Arizona (or choose "Subject and broader terms"
   on the advanced search screen with "more options" displayed), and
   check that you get the records with the subject "Arizona" and the
   records with the subject "United States"
3) Do a search for su-na:Arizona (or choose "Subject and narrower terms"
   on the advanced search screen with "more options" displayed), and
   check that you get the records with the subject "Arizona" and the
   records with the subject "Phoenix"
4) Do a search for su-rl:Arizona (or choose "Subject and related terms"
   on the advanced search screen with "more options" displayed), and
   check that you get the records with the subject "Arizona," the
   records with the subject "United States," and the records with the
   subject "Phoenix"
5) Ensure that other searches still work (keyword, subject, ccl,
   whatever)
6) Use "Did you mean?" page in admin section to enable ExplodedTerms
   plugin
7) Do a keyword search on the OPAC, confirm that searching for exploded
   terms is suggested.
8) Do a subject search on the OPAC, confirm that searching for exploded
   terms is suggested.
9) Do a non-keyword, non-subject search on the OPAC, confirm that
   searching for exploded terms is NOT suggested.
10) Disable ExplodedTerms plugin and enable AuthorityFile plugin.
11) Do search on OPAC, confirm suggestions are made from authority file.
12) Sign off

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Split into two patches. This patch includes only the functionality.
15 files changed:
Koha/SuggestionEngine.pm
Koha/SuggestionEngine/Base.pm
Koha/SuggestionEngine/Plugin/ExplodedTerms.pm [new file with mode: 0644]
admin/didyoumean.pl [new file with mode: 0755]
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/prog/en/modules/text/explodedterms.tt [new file with mode: 0644]
opac/opac-search.pl
opac/svc/suggestion
t/SuggestionEngine_ExplodedTerms.t [new file with mode: 0755]