11

If you have a web application with lots of records, is it a bad idea to use Google Search on your website? Instead of writing a search function and dealing with performance issue, you 'outsource' the search feature to Google.

3
  • 2
    This brings me to my curiosity, could you provide more details to the question? because you think that this might be a bad idea? you have more documentation will make you think it is a bad idea? You read something that made you think you get this?
    – RTOSkit
    Jan 22, 2013 at 7:14
  • Hi @RTOSkit, I have developed a few small web application and search functionality still remains one of the biggest challenge. I have to take into consideration the accuracy of the search result as well as server performance. I personally don't think it's such a bad idea but somewhat 'awkward' as it is the only part of the application that is not developed by you.
    – John Doe
    Jan 22, 2013 at 7:57
  • Ok I understand, @JCL1178 offered you an optimal answer.
    – RTOSkit
    Jan 22, 2013 at 8:13

3 Answers 3

7

For purposes of this answer I'm assuming you are talking about Google Custom Search/Site Search and not the Google Search Appliance which would be a VERY good idea, albeit an expensive one.

Outsourcing your search to Google Custom Search is not a bad idea but it may not be the best fit for your site/business model/whatever due to Google's limitations and rules.

The Custom Search is essentially the same thing as typing search terms site: yoursite.com into Google except you don't have to specify the site: yoursite.com part and you can embed a search form on your site. Site Search is a non-free version of Custom Search with more customization options and some access to the API. There are some other differences between Custom/Site Search and using Google proper that are explained in the linked documentation but the important thing to note is that they only work with what Google can see.

So the "lots of records" in your web application has to be fully able to be spidered by Google in order for Custom Search to really return accurate results. If you limit/protect the records from public viewing for any reason you either have to show Google the same limited results a logged-out user would see or you can have Google index the full content but then you must abide by the First Click Free rules or risk getting eaten by an angry Panda. If you present one thing to Google and another to visitors, that's Cloaking and you'll generate a penalty for your site. If all of the records you want included in search results are not able to be spidered for whatever reason, then using Google Custom Search or Site Search is not a good idea for your particular model.

But if you can allow everything to be indexed, you don't mind how Google returns the search results for Custom Search (or are unwilling to pay for Site Search to fix that), and are willing to risk having a critical page not get indexed for whatever reason, then you can and should should seriously consider it.

3

As JCL1178 mentioned in their answer, Google will only return results for what it has indexed. Not only does this mean that some of your results may never appear, but if your site is ever de-indexed for some reason, you've lost the search from your web site. Having something as important as search rely on an unsupported 3rd party service is dangerous.

Since you have direct access to the data, you can provide a much better, more fine-grained search than Google or any other search engine can. You can allow your users to search specific fields, filtering out any other hits from unrelated fields. Google doesn't have any context to the values it's searching for, so a search for the "Smith" family could bring up any results for people living on "Smith St." or someone with the occupation of "blacksmith".

Most of the popular relational databases come with the ability to do full-text searches, so adding a basic search feature could be as simple as writing a few SQL statements.

I use Google Custom Search Engines for general search on my websites, but I wouldn't use it to search information that's stored in a database, unless my ability to do full-text searches was limited (software limitations, performance issues due to hardware/size of data set). It does depend on how complex your data is, and how important search is in navigating your data... but providing your own search facilities seems like the safest bet to me.

6
  • All very good points and I totally skipped the possibility of de-indexing in my response.
    – JCL1178
    Jan 23, 2013 at 0:17
  • Hi @Jacob Hume. Great point there about relying on third-party service. That was what I had in my mind as well. I have experimented with full-text searches and also various search engines but as I have mentioned in one of my comment, I always have issues with either accuracy of the results and / or server performance. Again, thank you very much for your input.
    – John Doe
    Jan 23, 2013 at 1:44
  • 3
    So instead of having a 0.00001% chance of search going down (chances are, Google isn't going to de-index your site unless you do something really stupid), you're proposing that the site have a naive full-text search implementation 100% of the time? Not a good trade-off IMO. Full-text search is a very useful feature for quickly accessing basic search functionality, but building a useful search feature, much less one as user-friendly as Google's, is a bit more complicated than just "writing a few SQL statements". Feb 4, 2013 at 3:40
  • 2
    Real search engines like Google, Solr, Lucene, Sphinx, etc. are able to do things like weigh keyword proximity, substring searches, levenshtein distance/metaphone/wordstemming/fuzzy text search, etc. that greatly improve usability. Full-text search is a good starting point, but it actually takes a lot more work to build a decent search feature that can consistently return relevant results. Most developers who aren't experts on search engine development would do well to use a 3rd-party service or at least a proven off-the-shelf solution like Lucene or Solr. Feb 4, 2013 at 3:41
  • 2
    Even big companies like Oracle struggle to create useful site-wide searches in-house (compare MySQL.com's documentation search before and after the Oracle takeover). Also, your characterization of Google's search engine is more appropriate for home-grown full-text search than Google's search engine, which actually uses probably the most advanced heuristics and user-intent prediction algorithms in the industry. Feb 4, 2013 at 3:46
1

I would suggest you to use the Google Search, if you want all the data of your site to be seen by others too. It will save the extra bit of coding.

If it is a closed system and you do not want others to see the data, then get your own search system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.