Progress isn’t made by early risers. It’s made by lazy men trying to find easier ways to do something.
– Robert A. Heinlein
This is especially true when discussing databases. Often when discussing text search, the first thing that comes to mind is ElasticSearch – indeed it’s a great product, works well, but can often be a pain to setup and maintain. PostgreSQL in contrast dead simple to set up, runs anywhere, is easy to maintain and probably is “good enough”.
Why Full-Text Search in PostgreSQL
It’s easy to setup, maintain, and there’s already an effective deployment pattern in companies.
I run a company called MetaCortex, where all of our products are focused on understanding how people think. Almost exclusively, our processed data[1] is stored in PostgreSQL databases. Our website ProjectPiglet.com, for instance, uses it exclusively – even though daily we process tens of thousands of comments, with millions of database inserts & reads.
It’s often said, that there are better options for full-text search and technically, that’s true! However, pragmatism is often an engineers best friend and PostgreSQL is easy for us – as the option is almost always available.
Implementing faceted search with Django and PostgreSQL
I’ve added a faceted search engine to this blog, powered by PostgreSQL. It supports regular text search (proper search, not just SQL”like” queries), filter by tag, filter by date, filter by content type (entries vs blogmarks vs quotation) and any combination of the above. Some example searches:
- All content matching “postgresql”
- Just quotations matching “django”
- All content matching “python” and “javascript” with the tag “mozilla” posted in 2007
It also provides facet counts, so you can tell how many results you will get back before you apply one of these filters – and get a general feeling for the shape of the corpus as you navigate it.
Algolia: Custom Site Search
Build Unique Search Experiences
Hosted Search API that delivers instant and relevant results from the first keystroke
Google Still Doing At Least 1 Trillion Searches Per Year
Company is sticking with figure it gave in 2012 but stresses it’s “over” that amount. How much over, Google’s not saying.
Google confirmed to Search Engine Land that it did give Backchannel the 2012 figure — over 100 billion per month, which Google rounds to 3 billion per day — for its story. Google told us that the figure still holds for today since “over” leaves things open-ended (and by implication, higher). Google also said not to expect an updated figure any time soon.