Can you explain why you are not interested in using an external index? For full-text search, I always return to using PostgreSQL's full-text indexing capabilities - it is very fast, indexing does not require a full index update (e.g., Solr), and results are returned faster than Lucene-based solutions (such as Elastic Search).
But if you really want to do this in the process, you probably want to look at Lunr: http://lunrjs.com/ - it works in Node, not just the browser.
Edit: Here, where I got Postgres statistics faster than Lucene: http://fr.slideshare.net/billkarwin/full-text-search-in-postgresql - see Slide 49.
Edit: I’m not sure what speed you are looking for / outside the process, but our PostgreSQL database can do 100 thousand queries per second without breaking a sweat, and it’s not even on SSDs. You may be thinking too much about your performance needs - after all, after you need to switch to several nodes (or use a cluster to take advantage of all processors), you still have to reset the process.
Matt Sergeant May 19 '13 at 15:44 2013-05-19 15:44
source share