Loading
0 comments

Another Wheel Not Reinvented: Full-text Search

If you spend enough time with people using AppEngine, trolling the newsgroups or answering questions in the google-app-engine tag on StackOverflow, you will begin to notice a collection of ‘holy grail’ problems and features that always come up. As near as I can tell, these include: really good pagination, uninqueness constraints in the datastore and full-text search. There are others, of course, but those three come up all the time, and finding solutions for them tends to be problematical because of certain inherent characteristics of the datastore.

The pagination issue has been addressed to my complete satisfaction by Ben Davies’ PagedQuery class; I have written about it in a previous post.

Full-text search is much trickier, and I don’t yet know of any true solution, but I think that for many applications, there is a free, simple and elegant alternative. You were probably looking at it just a second ago. Go back to the home page of this blog, and take a look at the Google Custom Search bar that now sits at the top. Give it a try.

I was able to create that Custom Search in less than 10 minutes, and I spent about 30 minutes getting it to look just the way that I wanted. Now, my blog is searchable through the very best means available: Google.

Certainly, there will be a substantial class of applications that won’t be able to take advantage of this terrific, free service in the same way that I have, but many will, and they should not even consider rolling their own indexing engine, search parser and presentation templates. Just don’t. Don’t be a control freak, and don’t go looking to solve the problem just because it is such a hard one. Use your time on better things like creating great services that solve real-world problems.