Presentation Transcript
Canned Searches in WebVoyage: Canned Searches in WebVoyage presented by
Hal Bloom
Manager, Baker Library Information Technology
Harvard Business School
hbloom@hbs.edu
Voyager User Group Meeting, April 2001
How does WebVoyage work?: How does WebVoyage work?
Browser to Webserver: Browser to Webserver
HTML source for form using GET method: HTML source for form using GET method
Keyword Anywhere search
Title search
What does this stuff mean?: What does this stuff mean? ACTION="/cgi-bin/Pwebrecon.cgi"
send the information entered on the form to the program called Pwebrecon.cgi located in the /cgi-bin/ directory
METHOD="GET"
pass the information to the Pwebrecon.cgi program by putting it after a “?” in the URL pointing to the program.
Example: /cgi-bin/Pwebrecon.cgi?DB=local&CNT=25
format of URL after the “?” is variable=value pairs separated by an “&”.
So?: So? If WebVoyage
creates forms
which create URLs
which pass information to a program
which contacts opacsvr and returns the results of a search,
then why can’t we create URLs which do the same thing and put them on web pages we create?
We can, and here’s how...
How to create a canned search: How to create a canned search Do a search in WebVoyage
Copy and paste the URL into a word processing program
Remove the &SEQ, &PID, and &HIST variables and values from the URL
Insert DB=local& right after the “?”
You’ve done it!
Example of creating a canned search: Example of creating a canned search Here’s what WebVoyage returned (all one long string)
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?Search_Arg=road+home&Search_Code=TALL&PID=17915&SEQ=20010228104332&CNT=25&HIST=1
Here’s the canned search after editing
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?DB=local&Search_Arg=road+home&Search_Code=TALL&CNT=25
A canned search in context: A canned search in context Here’s HTML incorporating a canned search. It links a book title to the WebVoyage display for that title (using an ISBN command search):
Bargaining and market behavior : essays in experimental economics / Vernon L. Smith.Cambridge, UK ; New York : Cambridge University Press, 2000.
Building a search from scratch: Building a search from scratch http://your-server/cgi-bin/Pwebrecon.cgi?
DB=local&
Search_Arg=xxxxx&
Search_Code=yyyy&
CNT=nn
&Vn=1 (optional)
Search_Arg: Search_Arg Because the argument is part of a URL, we need to follow the HTML conventions for specifying blanks, commas, etc.
+ (or %20) for a space
%2C for a comma
%22 for double quotes
e.g.: the phrase “shils, edward” would be coded as:
%22shils%2C+edward%22
Search_Code: Search_Code The Search Code must be one of the codes listed listed on either the Search Definitions, Composite Definitions or Keyword Searches dialogs (on System>Search Configuration dialog in the the System Administration module. In addition, there is FT for Full-Text Keyword and CMD for command search. An * after the code indicates relevance ranking is desired, and a + indicates a Browse search. Examples: FT* AUTH+ TALL SUBJ+ JKEY
V (the view to display): V (the view to display) If you know that you’re going to retrieve a single record, you can choose which view you want for that record
v1=1 will display using the first view you’ve defined
called “short view” on Endeavor’s demo site
v2=1 will display using the second
called “long view” on the demo site
Let’s build an ISBN Searchand display using the long or detailed view: Let’s build an ISBN Search and display using the long or detailed view http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?
DB=local
&Search_Arg=isbn+0670772895
&Search_Code=CMD
&CNT=25
&v2=1
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?DB=local&Search_Arg=isbn+0670772895&Search_Code=CMD&CNT=25&v2=1
Other standard searches: Other standard searches Author search:
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?DB=local&Search_Arg=shils%2C+edward&Search_Code=AUTH&CNT=25
Subject search:
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?DB=local&Search_Arg=venture+capital&Search_Code=SUBJ&CNT=25
Why use canned searches?: Why use canned searches? Primarily to add value to web products
New Books web page can take you to the WebVoyage page for each book
The best search for a particular subject can be encoded in a canned search, thus providing better precision than most patrons would get doing their own searching.
Refined Subject Search: Refined Subject Search ...from the Venture Capital Industry Guide on the Baker Library Web Site.
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?&DB=local&Search_Arg=((SKEY+%22Venture+Capital%22)+AND+(260c+199?+OR+260c+c199?+OR+260c+200?+OR+c200?))+OR+(Venture+AND+Capital+AND+%22working+papers%22))&Search_Code=CMD*&CNT=25
…and the downside: …and the downside From Endeavor supportweb: “EISI reserves the right to change the format of any/all search URLs between releases.”
…and the format has changed with every major new release, which adds some interesting work to the upgrade process for whoever does website maintenance.
From 99 to 2000 is particularly problematic, because not only has the format changed (different variables) but the order matters, so simple substitution isn’t possible :-(
Linkchecking canned searches: Linkchecking canned searches
When a canned search link is checked, a new instance of opacsvr is started on the voyager system
since the timeout for opacsvr is designed for human interaction, many many opacsvrs get started and the voyager system quickly runs out of resources
“The Library Catalog is currently unavailable”
So exclude canned links from being checked
If they worked when they were created, they should continue to work until you upgrade your Voyager system
Converting from 99.1 to 2000: Converting from 99.1 to 2000 Because order matters and parameters have changed, can’t do global replace
Solution: write a cgi-script to read 99.1 style search, and then redirect the browser to WebVoyage using 2000 style search
Then do global replace of WebVoyage address with cgi-script address
99.1 to 2000 (continued): 99.1 to 2000 (continued) Original URL
http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?v2=1&CNT=10+records+per+page&DB=local&CMD=ISBN+0195924517
Change to:
http://www.your-library.edu/cgi-bin/transform.cgi?v2=1&CNT=10+records+per+page&DB=local&CMD=ISBN+0195924517
transform.cgi script returns:
Location: http://www.your-library.edu/cgi-bin/Pwebrecon.cgi?DB=local&Search_Arg=isbn+ 0195924517 &Search_Code=CMD&CNT=10&v2=1
Further Information: Further Information Support WEB: Canned Searches for Webvoyage 2000.1
http://support.endinfosys.com/cgi-bin/validate/enter.cgi?page=Simba/Products/2kcanned.htm
U of Wisconsin (as of 3/5/01 for 99.1 canned searches)
http://madcat.library.wisc.edu/help/cannedsearches.htm