5
6 Comments

Best Search stack for Node

Anyone who is using node/express, what is the best search stack?

I want to build some search functionality into my web app and I'm trying to find the best search stack.

All I really come across is Elastic search - just wondering if there are alternatives and what the pros/cons are.

on February 22, 2020
  1. 2

    For most search related stuff, you'd have to depend on Apache Lucene, Solr, Elasticsearch or the like.

    I'd suggest you take a look at Algolia (which I believe internally uses Elasticsearch but is very fast to setup on the cloud and start using). There is Swiftype too from the Elasticsearch folks themselves.

  2. 2

    What kind of data are you searching, and how much data is there to search?

  3. 1

    Elastic is great, and so is Solr and Lucene. I've found Elastic to just be a bit more approachable, but all three of those are outstanding and incredibly powerful.

  4. 1

    Elasticsearch is great, lots of hosted options.

    If you never want to think about it again, or if you want to be prepared to scale quickly, then Elasticsearch/Algolia is the only way to go.

    For smaller data sets, PostgreSQL works great. You won't see a meaningful difference between elastic and PostgreSQL with regards to full-text search if you only have a few thousand documents. For very small data sets, just send an array of objects to the client and perform search there. In my experience, a browser can search through thousands (or more) of objects in an array without really degrading the user experience. But it really depends on what you are doing.

    If you are on AWS, I would spin up the hosted version of postgreSQL (Aurora) and Elasticsearch, put your documents in both, then do some benchmarks against the APIs.

    PostgreSQL features on AWS: https://aws.amazon.com/rds/postgresql/features/

  5. 1

    Elasticsearch <3

  6. 1

    If I were building with that stack I'd go with Azure Cosmo DB -- https://azure.microsoft.com/en-us/services/cosmos-db

    Dynamo or Cassandra on AWS are also viable options. BUT this heavily depends on your data access patterns and storage/search needs.