No Quotes, No Service

      Comments Off on No Quotes, No Service

It really must be Voyager month…I’ve spent more time on this system in the past 30 days than in the preceeding year. But that’s OK, much of the time’s been spent removing a batch of little annoyances that have crept in across various releases and hung around seemingly forever.

opacscreen.jpgFor example, since the Voyager epoch (for us, around 1996) it’s been the case that our web OPAC defaults to a keyword search—and of course, most users approach the search box as though they’re at Google. Like Google, our system accepts most anything you might care to enter but more often than not your first attempt yields a Your search resulted in no hits! message.

As an aside, I’ve always wondered about that little exclamation point. Is the system happy about this or just trying to spin an unpleasant message?

So you either pose a different query or knowing that the library must have the title you’re trying to locate, you read the help screen and see you have to enclose a multi-word search in quotes or connect the terms with upper-case Boolean connectors.

For years, that procrustean behavior was just chalked up as a training opportunity.

Today I got an email from a colleague at our Law School’s library (which shares our OPAC), mentioning first that he really appreciated a few of my recent “fixes” and asking if I’d take a look at improving the behavior of our keyword search box. Helpfully, he included a couple of links to Voyager sites where it worked better.

Now that’s how you send a complaint to your Systems Office.

Of course, I immediately dropped everything and got to work on the problem. How dare some other site not only fix the problem but then put it out there where everyone can see it!

Following his links, I poked around Yale’s OPAC, then UCLA’s. Sure enough, both had figured out a way to inject a bit of javascript into the process, compensating (where needed) for the absence of either quotes or connectors.

Peeling back the URLs I soon had the javascript (opac.js) displayed and could see that UCLA started the process and Yale built upon their work. I next visited Kansas State University and found a later evolution of the same codebase. The KSU script mentioned Harish Maringanti, a member of their digital initiatives team and credited him with optimizations. I’d say so, Harish’s work reduced the original code from 32K to just over 5K. I later got it down to quick-loading 2K by removing comments, spaces, joining lines and generally rendering the code indecipherable to all but a browser.

From the KSU library staff directory I found Harish’s email address and sent a message. Within a minute I had a reply and his blessing on my reuse of his code. Total turnaround time from “suggestion email” to fixed OPAC was probably something under five minutes.
Here’s a simple recipe for any other Voyager admin who’s interested in making the fix:

1. Log onto your WebVoyage server and create a “js” directory under your /m1/voyager/xxxdb/webvoyage/html directory. You’ll end up with /m1/voyager/xxxdb/webvoyage/html/js

2. Download this file and save it as “opac_stuff.js” or “opac.js” or “whatever.js” in the new directory you created in step 1.

http://magik.gmu.edu/js/opac_stuff.js

2. Add this line to your header.htm file:

<script language="javascript" xsrc="/js/opac_stuff.js"></script>

3. That’s it. Now send an email to Harish Maringanti (harish [at] ksu.edu) and tell him how much you appreciate the work he did on this. And remember to thank anyone you meet from Yale or UCLA for getting the ball rolling.

You can try this out here:

http://magik.gmu.edu/cgi-bin/Pwebrecon.cgi?DB=local&PAGE=First