Koha/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc
Jared Camins-Esakov 4feb6a4736 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.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-18 15:20:48 +02:00

34 lines
2 KiB
HTML

<select class="advsearch" name="idx">
<option value="kw">Keyword</option>
<option value="au">Author</option>
<option value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author as phrase</option>
<option value="cpn">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name</option>
<option value="cfn">&nbsp;&nbsp;&nbsp;&nbsp; Conference name</option>
<option value="cpn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name as phrase</option>
<option value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference name as phrase</option>
<option value="pn">&nbsp;&nbsp;&nbsp;&nbsp; Personal name</option>
<option value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal name as phrase</option>
<option value="ti">Title</option>
<option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title as phrase</option>
<option value="se">&nbsp;&nbsp;&nbsp;&nbsp; Series title</option>
<option value="su">Subject</option>
<option value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject as phrase</option>
[% IF ( expanded_options ) %]
<option value="su-br">&nbsp;&nbsp;&nbsp;&nbsp; Subject and broader terms</option>
<option value="su-na">&nbsp;&nbsp;&nbsp;&nbsp; Subject and narrower terms</option>
<option value="su-rl">&nbsp;&nbsp;&nbsp;&nbsp; Subject and related terms</option>
[% END %]
<option value="bc">Barcode</option>
<option value="location">Shelving location</option>
<option value="sn">Standard number</option>
<option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
<option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
<option value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
<option value="ln,rtrn">Language</option>
<option value="nt">Notes/Comments</option>
<option value="curriculum">Curriculum</option>
<option value="pb">Publisher</option>
<option value="pl">Publisher location</option>
<option value="yr">Publication date (yyyy)</option>
<option value="acqdate">Acquisition date (yyyy-mm-dd)</option>
</select>