David Cook
f6daff353d
This patch fixes the "Publication date" and "Acquisition date" searches when using non-QueryParser and QueryParser searches. It adds structure attributes to the template, which is consistent with how phrase searching is currently handled. It removes unnecessary code from Search.pm, adds some necessary code which is consistent with existing code, and adds a lot of explanatory comments. _TEST PLAN_ Before applying: 0) Turn off QueryParser 1) Try a "Publication date" or "Acquisition date" search from the staff client advanced search. 2) Note that even though the description on the result page makes it seem like you're doing an index-specific search, you're actually doing a keyword search. You can verify this by checking the 008 from positions 7 to 10 for "Publication date" or "Date accessioned" on items for "Acquisition date". 3) Turn on QueryParser 4) Try doing the searches from Step 1. 5) A "Publication date" search should probably produce zero results After applying patch: 6) Keep QueryParser on 7) Try doing the searches from Step 1. 8) Notice that you're actually getting results consistent with your search (ie the 008/7-10 shows the date you searched for, and there is a "Date accessioned" in items which matches your search) 9) Turn off QueryParser 10) Note that your results are exactly the same as step 8 (N.B. this is because QueryParser is falling back to non-QP mode instead of producing a bad query.) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
54 lines
2.7 KiB
HTML
54 lines
2.7 KiB
HTML
<select class="advsearch" name="idx">
|
|
<option value="kw">Keyword</option>
|
|
<option value="kw,phr"> Keyword as phrase</option>
|
|
<option value="au">Author</option>
|
|
<option value="au,phr"> Author as phrase</option>
|
|
<option value="cpn"> Corporate name</option>
|
|
<option value="cfn"> Conference name</option>
|
|
<option value="cpn,phr"> Corporate name as phrase</option>
|
|
<option value="cfn,phr"> Conference name as phrase</option>
|
|
<option value="pn"> Personal name</option>
|
|
<option value="pn,phr"> Personal name as phrase</option>
|
|
<option value="ti">Title</option>
|
|
<option value="ti,phr"> Title as phrase</option>
|
|
<option value="se"> Series title</option>
|
|
<option value="su">Subject</option>
|
|
<option value="su,phr"> Subject as phrase</option>
|
|
[% IF ( expanded_options ) %]
|
|
<option value="su-br"> Subject and broader terms</option>
|
|
<option value="su-na"> Subject and narrower terms</option>
|
|
<option value="su-rl"> Subject and related terms</option>
|
|
[% END %]
|
|
<option value="bc">Barcode</option>
|
|
<option value="location">Shelving location</option>
|
|
[% IF (numbersphr) %]
|
|
<option value="sn,phr">Standard number</option>
|
|
[% ELSE %]
|
|
<option value="sn">Standard number</option>
|
|
[% END %]
|
|
<option value="nb"> ISBN</option>
|
|
<option value="ns"> ISSN</option>
|
|
[% IF (numbersphr) %]
|
|
<option value="callnum,phr"> Call number</option>
|
|
[% ELSE %]
|
|
<option value="callnum"> Call number</option>
|
|
[% END %]
|
|
<option value="ln,rtrn">Language</option>
|
|
<option value="nt">Notes/Comments</option>
|
|
[% IF (marcflavour != 'UNIMARC' ) %]
|
|
<option value="curriculum">Curriculum</option>
|
|
[% END %]
|
|
<option value="pb">Publisher</option>
|
|
<option value="pl">Publisher location</option>
|
|
[%#
|
|
Use non-normalized st-year instead of st-numeric,
|
|
since pubdate can include 'u' to signify unkown
|
|
dates. See "Legal Characters" at:
|
|
http://www.loc.gov/marc/bibliographic/bd008a.html
|
|
|
|
This search is also for date ranges due to the
|
|
special Zebra r=r CCL mapping for 'yr'
|
|
%]
|
|
<option value="yr,st-year">Publication date (yyyy-yyyy)</option>
|
|
<option value="acqdate,st-date-normalized">Acquisition date (yyyy-mm-dd)</option>
|
|
</select>
|