410 likes | 430 Views
Learn how to create custom search forms on library websites with examples for forms, codes, and implementation options. Improve user search experience with simple external search forms and advanced JavaScript features.
E N D
Expose your Collectionswith Custom Search Forms Beth Juhl and Deborah Kulczak University of Arkansas Libraries Arkansas IUG June 18, 2010
Simple External Search Forms • on library web site • as widgets • on other library sites Code examples will be on ArkIUG web site soon!
<form method=“get" action="http://your.iii.server/search/" name="search" id="search"> <input type="hidden" value="X" name="searchtype" id="searchtype"> <input type="text" name="searcharg" size="40" maxlength="75" value="" /> <input type="hidden" name="SORT" value="D" /> <input type="submit" value="Search Now"/> </form> Sort Codes: D = default sort for that index DX = Date AX = title
<form method=“get" action="http://your.iii.server/search/" name="search" id="search"> <input type="radio" value="X" name="searchtype" checked="checked“ />Keyword <input type="radio" value="a" name="searchtype" />Author <input type="radio" value="t" name="searchtype" /> Title <input type="radio" value="d" name="searchtype" /> Subject <br /> <input type="text" name="searcharg" size="40" maxlength="75" value="" /> <input type="hidden" name="SORT" value="D" /> <input type="submit" value="Search Now" onclick="this.form.target='blank';return true;" /> </form>
Fancier Implementations Require Javascript • open search in new window / tabs • control the size / behavior of new windows • add together search terms
Parse that Search URL! • http://library.uark.edu/search/X?SEARCH=%28arkansas%29%20and%20%28higher%20education%29&Da=1990&Db=2010&SORT=D&l=eng&m=a&s=m&b=main • http://library.uark.edu/search/ = search your III server • X? = it’s a keyword search • SEARCH= here comes the search • %28 = ( %29 = ) %20 = [space] (arkansas) and (higher education)
Parse that Search URL! • http://library.uark.edu/search/X?SEARCH=%28arkansas%29%20and%20%28higher%20education%29&Da=1990&Db=2010&SORT=D&l=eng&m=a&s=m&b=main • &Da=1990 date after 1990 • &Db=2010 date before 2010 • &SORT=D default sort • &l=eng language is English • &m=a material type is text • &s=m monographs , not serials • &b=main location is MAIN
Pseudo-Scoping • Use Location Codes to Pre-limit Keyword Searches
<script type="text/javascript" src="/ssi/infolinkslocsearch.js"></script> <form action="" method="get" name="search" id="search" onsubmit="return false;" > <p><input type="text" name="searcharg" id="searcharg" size="40" maxlength="75" value="" /></p> <p>Location: <select name="b" id="b"> <option value="law" selected="selected">Law Library Only</option> <option value="">All Libraries</option></select> <p> <input type="button" value="Search" onclick="searchinfolinks();" /> </p> <p> <input type="reset" name="Reset" id="Reset" value="Clear Form and Try Another Search" /> </p> </form> Part 1: The Search Form
Part 2: The Javascript // Search InfoLinks and Limit to Locations //<!-- function searchinfolinks() { varsearchtext = document.getElementById('searcharg').value; varsearchsort = document.getElementById('sort').value; varsearchloc = document.getElementById('b').value; varsearchurl = "http://library.uark.edu/search/X?SEARCH=%28" + searchtext + "%29&SORT=" + searchsort + "&b=" + searchloc; window.location.href = searchurl; } // -->
Adding Terms Behind the Scenes • local subject terms (“faculty author”) • format and location (“atlas and reference”) • types of material (“feature film” or “dvd”)
“DVD” in 538 field Film “genres” from the 650 field
Part 1: The form <script type="text/javascript" src="/ssi/videosearch.js"></script> <p>Test Video Search</p> <form action="" method="get" name="search" id="search" onsubmit="return false;" > <input name="Sort" id="Sort" type="hidden" value="AX" /> <input name="MatType" id="MatType" type="hidden" value="g" /> <p>Keywords: <input type="text" name="Keywords" id="Keywords" size="40" maxlength="75" value="" /> </p> <p>Choose a Format: <input name="Format" type="radio" id="Format" value="DVD" checked="checked" /> DVD only <input type="radio" name="Format" id="Format" value="" /> DVD or VHS okay </p> <p> Choose a Genre: <select name="Genre" id="Genre"> <option selected value=" ">Select a Kind of Film (Optional)</option> <option value="%22Feature films%22">Feature films</option> <option value="%22Documentary films%22"> Documentary films</option> <option value="%22Adventure films%22"> Adventure films</option> <option value="%22Animated films%22"> Animated films</option>
Part 2: The script // Search InfoLinks for videos //<!-- function videosearch() { varsearchKeywords = document.getElementById('Keywords').value; varsearchGenre = document.getElementById('Genre').value; varsearchFormat = document.getElementById('Format').value; varsearchMatType = document.getElementById('MatType').value; varsearchSort = document.getElementById('Sort').value; varsearchurl = "http://library.uark.edu/search/X?SEARCH=%28" + searchKeywords + " " + searchGenre + " " + searchFormat + " " + "%29&SORT=" + searchSort + "&m=" + searchMatType; window.location.href = searchurl; } // -->
Adding Record Elements to Enhance Retrieval • Arkansas Newspaper Project • Do you have any newspapers published in _______ from the years _________?
Arkansas Newspaper Project • Part of the United States Newspaper Program, funded by NEH • Based at University of Arkansas, Fayetteville, 1988-1994 • Mission to catalog and microfilm newspapers found throughout the state
Arkansas Newspaper Project • Another component was OCLC Union Listing • LDR (now LHR) created for each participant for each holdings format • Issue-specific notation • USNP format <yyyy:mm:dd> • A “SULOP” tape load generated “Library Has” notes in our catalog
Newspaper Record in Our Catalog MARC 752 “Lib Has”
752 Field • Defined as “Added Entry-Hierarchical Place Name” • Required in USNP records for • Place of publication • Area of coverage • Multiple 752s when place of publication changes or when several counties or towns included in coverage • We indexed in subjects and keywords
“Lib Has” • MARC fields 860 and 866 • Not indexed • Could be used for data entry
We Needed a New Field! • Local subject field 690 • Already used for local collection names, local series, virtual bookplates, etc. • Indexed in subjects and keywords • Format selected was 690 |y 1930 • Didn’t want to confuse with LCSH-type chronological subdivisions (|y 1931-1940) • Easier for data entry (meaning fewer errors)
Public Display • Multiple 690s take up valuable “real estate” in WebOPAC, and they might be confusing to users • The beauty of |y is that it’s not used in any other 690 fields • We decided to suppress decades by inserting a line in the webpub.def file
The Project • Used “Create Lists” to gather all the Arkansas newspapers (about 1,050) into a review file • A library technician completed data entry of 690 fields in a 2-month period (November-December 2009) • We excluded • Newspaper records in aggregator databases • Limited retention holdings • Proofreading and building the search form took a couple more months
http://libinfo.uark.edu/periodicals/arkansasnewspapersearch.asphttp://libinfo.uark.edu/periodicals/arkansasnewspapersearch.asp
Actual search terms: su:newspaperssu:"United States Arkansas Washington" 1880
Maintenance • Must remember to add decades when • New titles are cataloged • A new decade begins • Procedures in place for this!
Now, go expose yourselves! Beth Juhl and Deborah Kulczak University of Arkansas Libraries Arkansas IUG June 18, 2010