Thursday, December 1, 2011

Google Verbatim Search

Recently, I've found that the quality of search results from Google and the lack of the '+' operator have driven me to trying out all sorts of new ways to find technical info on the web. I've tried duckduckgo and Bing, but they are actually quite a bit worse. I've found that the verbatim search in Google is quite handy but is a pain to get to. The alternative is to enclose all your important keywords in double-quotes.

Since I use Firefox the most, I decided to put in a custom search provider that basically performs a verbatim search on Google. After looking at the URLs for two searches, one with the verbatim turned on and the other without, I found that you need to append "tbs=li:1" to the querystring to enable the verbatim search.

I fired up Notepad++ and edited the "google.xml" file in the "searchplugins" folder of firefox's folder (C:\Program Files (x86)\Mozilla Firefox\searchplugins on my comp). I made the following addition to the XML:
<Param name="aq" value="t"/>
<Param name="tbs" value="li:1"/>
<!-- Dynamic parameters -->
<Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
<MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>
I had to save the file as "google-verbatim.xml" and change the name of the plugin to avoid a conflict because apparently saving over the existing one does not make it refresh in the browser even after a restart. After restarting the browser, I was able to choose the new search provider using the dropdown in the search bar:

Now all the searches from the search bar are verbatim. It's been helping a lot!

Labels: , ,