News for hackers. Stuff that matters.
Re:Postgres full text search is good enough by hendry on Monday September 29, 2014 @02:17AM (#8381858)
Postgres, elasticsearch and SOLR all seem pretty heavyweight to me.

What's the lightweight approach to create an inverted index nowadays with some basic stemming?

Re:Postgres full text search is good enough by frik on Monday September 29, 2014 @04:31AM (#8382078)
* Sphinx search (free, open source): http://sphinxsearch.com , http://en.wikipedia.org/wiki/Sphinx_(search_engine)

It's the lightweight & fast alternative, similar to what Nginx is to Apache and IIS.

* SQLite FTS 4 (free, open source): http://www.sqlite.org/fts3.html

Lightweight & embedded solution (suitable for small to medium sized database and single process).

Re:Postgres full text search is good enough by mrweasel on Monday September 29, 2014 @03:53AM (#8382006)
It might fall into "heavyweight" for you, but Sphinx Search is pretty easy to setup and get started with.

For Go there's also Bleve (http://www.blevesearch.com/), but I haven't tried it yet.

Re:Postgres full text search is good enough by lobster_johnson on Monday September 29, 2014 @02:43PM (#8384422)
Xapian is excellent. It's an embedded C++ library, and there are bindings for most languages.

It's well-designed but fairly basic. Since it's a library, you'll have to write the server part yourself. (It has a server called Omega, but I've never used it.)

Indexing is slower than Lucene, though, but it's not too bad. The only significant problem I found with it the last time I was using it (which was 5+ years ago) was that writers occasionally would cause queries to abort, and you had to restart them, a cycle which could lead to long query times if you had lots of write churn.

Re:Postgres full text search is good enough by rjbwork on Monday September 29, 2014 @02:34AM (#8381886)
You can always just roll your own with lucene or lucene.NET, which is what ES/SOLR use underneath.
Re:Postgres full text search is good enough by collyw on Monday September 29, 2014 @03:25AM (#8381961)
I never use Lucene, but I got the impression fro others that it was difficult to use, and that Elasticsearch gives it a relatively usable layer on top.
Re:Postgres full text search is good enough by rpedela on Monday September 29, 2014 @10:20AM (#8382918)
It isn't that hard to use in my opinion, but it is only a library. So you need to implement many things to turn it into a server which Solr and Elasticsearch have already done.
Re:Postgres full text search is good enough by framos on Monday September 29, 2014 @10:53AM (#8383106)
For Python it doesn't get easier than Whoosh (https://pypi.python.org/pypi/Whoosh). Both indexing and searching are done in Python, no need for external services or processes.

Features are limited and performance won't be the best, but sometimes ease of use and maintenance are all you need.

Re:Postgres full text search is good enough by leo_santagada on Tuesday September 30, 2014 @12:12AM (#8386729)
Re:Postgres full text search is good enough by latch on Monday September 29, 2014 @02:32AM (#8381882)
redis sets or sorted sets with a npl library (natural for node, treat for ruby...).

I'm sure there are packages that do the storage and retrieval for you, but it's the sort of lightweight thing you can do quickly and tweak from there.

Re:Postgres full text search is good enough by mborch on Monday September 29, 2014 @02:33AM (#8381884)