Monday, June 23, 2014

Searching for a search


In the beginning...there was responsive design for the website. It was good, but there had to be a better way to search on the website. So the search began for a better search. It had to be light so phones could access it, and it had to be easy to use so users wouldn't have to waste too much time keying in their search request.

The Search

Like many other colleges and universities, Tarleton utilized Google's Custom Search Engine to search our website. As we saw from other universities using the Google search, results would always appear on a generic results page, however we needed more control over the results because of issues our users had from this search engine:
  • Results would rank our departmental pages inaccurately
  • Results for the existing online phone directory couldn't be combined with the Google results
We needed more information and less information all at the same time. We wanted our search to provide better results for what users requested as well as more options to fine-tune their request results.

We found that Facebook's search function was different. It was full-featured, and at the same time unobtrusive and minimalist. We liked the idea of providing categories (i.e., search the web, search the phone directory, search the website directory) for fine-tuning search results, and we could add more categories as needed (i.e., search the press releases). Web Services staff all agreed that the Facebook search style was the direction we needed to go due to its flexibility.


Caution: Technical jargon ahead. 

We had some feeds we could implement immediately our search, so in order to make them better for phones and just easier to use, I rewrote them to spit out JSON, which is an easier feed to manipulate (items being requested were just plain raw datum) and style for our use (no need to work around Google's styles to make the content appear seamlessly as part of the Tarleton website user interface). I also made use of AJAX, so the page would not need to be refreshed or open a new page which saves mobile phones from wasting data. In a world where a phone is taxed on how much data it uses, every kilobyte counts.

As of this post we have:
  • People and Departments
  • Website Directory (formerly the A-Z Directory)
  • Google
  • News
People and Departments is our updated phone and email directory. We wanted the results to be more accessible from a mobile phone, since smart phones can make calls off numbers displayed on web browsers. Also our desk phones connected to our desktop computers (and Cisco Jabber) can make use of the calling feature just by clicking the telephone icon.

Website Directory (A-Z Directory) was pretty straight forward. Cascade Server (our Content Management System) publishes an XML file that one of my search scripts parses for absolute matches or keyword alternatives. Karole cooked it up to be easy to modify with keywords that should be connected to each website or webpage for quicker, more accurate search results.

Google was a little tricky. The API Google provides for integrating Google search results on another website generally only allows for a limited number of results. To retrieve a longer list of results, you have to submit a request for the next set of results. That doesn't fly with what we were trying to accomplish in our seamless integration. In the background, when the user selects the 'More' button, a script runs loops to collect 100 searches. If Google runs out of results (which it won't), it stops the loop. In either case, it returns a JSON file with the results. The Google search results are the same results you see if you search directly on the Google Search website.

News pulls its data from our press releases maintained by Media Relations. It just searches for anything with the search criteria and spits it back. We already had an implementation based on JSON and AJAX that use for the news stories on the front page, so it was very easy to just request news stories with a search term.

Potential Future Projects

We have thrown around the idea of adding degree program searching, locations on campus, and specific keyword translations based on analytics (e.g., finding a department whose name has changed).


If you would like to provide feedback to us about the new search, such as ways to improve, just submit your feedback to our online form

Keep calm and search on.