[Bug 8211] New: Add "subject (broader), " "subject (narrower), " and "subject (related)" options for search
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Priority: P5 - low Change sponsored?: Sponsored Bug ID: 8211 Assignee: jcamins@cpbibliography.com Summary: Add "subject (broader)," "subject (narrower)," and "subject (related)" options for search Severity: enhancement Classification: Unclassified OS: All Reporter: jcamins@cpbibliography.com Hardware: All Status: ASSIGNED Version: master Component: Searching Depends on: 7818 Product: Koha With the addition of DOM indexing, it is now possible to do "exploded" searches which search for records with broader, narrower, and other related headings by searching authorities for the specified term, then using authorities that match the specified criteria to do a more inclusive search for bib records. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |8212 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 11851 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11851&action=edit Bug 8211: Add exploded search options 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 support for these "exploded" subject searches to Koha. To test: 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) Sign off Technical details: This patch adds a shim in front of C4::Search::buildQuery in order to preprocess the query and call the _handle_exploding_search callback. This shim will allow us to gradually offload query parsing to a new query parser module. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |8726 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Example authority records: Record 1: =001 1 =151 ##$aArizona. =551 ##$aUnited States$wg$92 =551 ##$aPhoenix$wh$93 Record 2: =001 2 =151 ##$aUnited States. =551 ##$aArizona$wh$91 Record 3: =001 3 =151 ##$aPhoenix. =551 ##$aArizona$wg$91 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11851|0 |1 is obsolete| | --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 12090 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12090&action=edit Bug 8211: Add exploded search options 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 support for these "exploded" subject searches to Koha. To test: 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) Sign off Technical details: This patch adds a shim in front of C4::Search::buildQuery in order to preprocess the query and call the _handle_exploding_search callback. This shim will allow us to gradually offload query parsing to a new query parser module. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |8649 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |8744 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12090|0 |1 is obsolete| | --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 12093 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12093&action=edit Bug 8211: Add exploded search options 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 support for these "exploded" subject searches to Koha. To test: 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) Sign off Technical details: This patch adds a shim in front of C4::Search::buildQuery in order to preprocess the query and call the _handle_exploding_search callback. This shim will allow us to gradually offload query parsing to a new query parser module. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12093|0 |1 is obsolete| | --- Comment #5 from wajasu <matted-34813@mypacks.net> --- Created attachment 12094 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12094&action=edit SIGNED-OFF-Bug-8211-Add-exploded-search-options.patch After pulling master i applied these: 0001-Bug-8744-Thesaurus-in-authorities-should-not-lock-fi.patch 0002-Bug-8649-Add-unit-test-for-C4-Search.patch 0003-bug-8649-make-sure-C4-Context-is-fully-mocked-up-bef.patch 0004-bug-8649-make-sure-we-can-exit-if-a-test-fails.patch 0005-bug-8649-create-a-temp-directory-for-Zebra-for-C4-Se.patch 0006-bug-8649-quiet-a-variable-use-warning.patch 0007-Bug-8211-Add-exploded-search-options.patch You need 8744 to be able to edit Geographical names in 551 (unlock them) 8649 has Search.t tests 1) I had created the authority heirarchy as comment#2 described. 2) I used z3950 to search LOC specifiying "United States" in subject heading, and chose "1000 things to love about America" and added an item. I navigated to its 651 Geographic name heading and clicked the editor icon for the 'a' subtag, and used the authority search plugin ( $a = United States ) and found the record that was created in step #1). choose it. I finished out the biblio and added an item. 3) I did the same thing as step 2) but for "Arizona" and "Phoenix" subject headingg, linking with the authority plugin as well. Pick a book for Arizona accordingly. 4) I ran rebuild-zebra and did my searches as described in comment #3) in the OPAC search. su-br:Arizona su-na:Arizona and su-rl:Arizona Each returned results. For me: I also had Phoenix in the su-br-Arizona search, and jcamins said there must be a subject heading in my chosen biblio for Phoenix. There was, so I edited my biblio, to remove the Restaurant -- Arizona TOPICAL TERM SUBJECT HEADING. After that I requeried su-br: Arizona, and the Phoenix item did not show up as we wanted. So there is an added restriction to be sure other subject heading don't interfere with results. Cool beans!!! wajasu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |matted-34813@mypacks.net -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA Comments: Looks good to me. Code clean, UT++ Just one thing: maybe it would be better to pass a hashref to parseQuery instead of 7 arguments. But it is possible to have some disagreements about that. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- (In reply to comment #6)
QA Comments:
Looks good to me. Code clean, UT++
Just one thing: maybe it would be better to pass a hashref to parseQuery instead of 7 arguments. But it is possible to have some disagreements about that.
The reasoning behind using the 7 arguments is that parseQuery is still just a shim, so we want it to look as much like buildQuery as possible. When parseQuery replaces buildQuery, the API will also be changed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_10 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master I had some trouble making this patch work, but, at the end, if your datas are OK and your zebra index uptodate, this patch works like a charm in UNIMARC. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Bug 8211 depends on bug 8744, which changed state. Bug 8744 Summary: Thesaurus in authorities should not lock fields http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8744 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Bug 8211 depends on bug 8649, which changed state. Bug 8649 Summary: C4::Search needs a unit test http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8649 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8211 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This feature is available in Master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org