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: , ,


At December 1, 2011 at 10:57 AM , Blogger David Crane said...

The problem with searching for technical info on google, even with verbatim search, is that it ignores special characters like > or #. Google code search didn't ignore special characters, but that only searched code repos, not the web, and google is shutting it down anyway.

SymbolHound is the only web search engine I know of that doesn't ignore special characters:

Full disclosure: I am a co-founder and developer of SymbolHound

At January 30, 2012 at 7:52 AM , Blogger Nitin Vericherla said...

You might be happy to hear (but probably not in terms of your startup) that Google now allows symbols in search :)

At May 8, 2012 at 9:48 PM , Blogger tcf628 said...

Google can look up the definitions of some symbols: for example, a Google search for "#" returns wikipedia results for "number sign". However, Google does not index symbols. For an example of this, see what happens when you search google for ">>" (which is something you might need to look up if you code in C++). It returns zero results.

Google may recognize symbols, but it doesn't index them. This is why exists.

At January 10, 2013 at 6:22 AM , Blogger Nitin Vericherla said...

For Chrome, you can create a new search engine entry in settings. For domain, enter {google:baseURL} and for query:


Post a Comment

Subscribe to Post Comments [Atom]

<< Home