Guided Google Search
This site was developed using JSP which implements the APIs made publicly available by Google.com. Basically, this site’s functionality is split into two parts. The first is for combinatorial keyword search, and the second is to search for keywords based on the servers hosting them. Each of them will be covered as we go on. The objective of this site is just to help guide a novice web user to get better search results, and to demonstrate the wonders that can be achieved just by making simple manipulations to Google’s functionality, through its APIs.
If you haven’t already realized, the arrangement of keywords in the search query makes a difference to the search result. Under the assumption that novice web users don’t usually know how to construct effective keywords in their search queries; this site provides a function that will automatically calculates the permutation and make different combinations of the keywords used. For example, if the user were to key in the term “science fiction”, it will automatically generate two combinations; which are “science fiction” and “fiction science”. The results are very different. (Try it, if you don’t trust me!). I should also mention here that the quotes do make a difference too. To Google; words in quotes means that they have to occur in that order, in the search results. So, in accordance to this, if the search query is placed with quotes, the result of the combinations will also be placed with quotes. I have also programmed the site to return only the first five results of the search. Reason being, I don’t want to use up my days quota too quickly. Google only allocates 1000 queries per developer who have registered with them.
The second function is slightly more complex in nature. It is suppose to allow the user to search for a keyword based on the first five hosts that are hosting it. There may be fewer than five hosts on display though. This is because the site automatically removes identical hosts from the list. (A further enhancement for this would be to make the site retrieve more than five hosts and keep the extras as backup, just in case there are duplicates).
Beside each link is a ‘plus’ sign, which means that it can be expanded. Clicking on it would make another query but this time, it is only restricted to that particular host. This can be done very easily by manipulating Google’s query syntax. In this case, it would be “site:some_host_domain”. There are many other query syntaxes that can be very useful, depending on how the programmer manipulates them. Here, I am just showing a simple application of this in action. I have to stress here, however, that this function is not guaranteed to give more accurate results. In many cases, it won’t; as the results are not the first few that were obtained from the usual keyword search query. The main purpose of this function is to allow the user to have a different perspective of searching. It gives a lateral way of looking at the results. With the search results obtained, it is hoped that the user will get a better idea of what they are searching for, and hence produce more accurate search keywords.
Future Enhancements
For now, the two functions that I have mentioned above are invoked separately. A further enhancement to this would be to have both the functions work together. It won’t be too hard to implement. Just a little more effort and some code manipulation would do the trick!
Other Google query syntax can also be added in. Some examples are “inurl:”, “allintext:”, “allinlinks:”, etc. Each one of these can be manipulated in various ways, to give various outcomes. The limit would be the programmer’s creativity!
Notes
I have also just found out that there is another similar
implementation of the second function, that is already
existent on the web. It was created and hosted by Staggernation.com. As of the
time of the creation of this site, I had no knowledge of Staggernation’s
implementation. Nevertheless, there is no harm in making similar
implementations; just as long as we all learn something! J