What's Everyone's Favorite Approach For Search Solutions With Shopify/Gatsby?

14 replies
Last updated: Mar 26, 2021
What is everyone's favourite approach for search solutions with Shopify/Gatsby setups? Our initial projects have been light on search requirements but we have an upcoming project where it will be a more substantial part of the UX.
I have heard that Algolia is:

• powerful and flexible
• complex (again, I'm not technical
🙂 )• expensive
But I haven't heard much discussion of headless search beyond Algiloa... any opinions out there?
AI Update

Great question! Search is definitely an area where you have several solid options beyond Algolia. Let me break down the landscape for you, especially in the context of Shopify/Gatsby setups.

Beyond Algolia: Alternative Search Solutions

You're right that Algolia is powerful but can be expensive and complex. Here are the main alternatives worth considering:

Typesense - This is probably the most popular Algolia alternative right now. It's open-source, significantly cheaper, and offers very similar features including typo-tolerance, faceting, and fast search. Typesense Cloud pricing starts much lower than Algolia (around $0.03/1000 searches vs Algolia's higher tiers), and you can also self-host it if you want even more control. There are community plugins for Gatsby integration, though not as mature as Algolia's official support.

Meilisearch - Another excellent open-source option with a focus on simplicity and developer experience. It's known for being easier to set up than Algolia while still providing great search relevance out of the box. Meilisearch Cloud pricing is competitive, and like Typesense, you can self-host. The Gatsby integration requires a bit more manual setup but is definitely doable.

Elasticsearch/Opensearch - More powerful but definitely more complex. These are better suited for large-scale projects with advanced search requirements. Elastic Cloud can get expensive, but Opensearch (the open-source fork) can be self-hosted. Probably overkill unless you have really specific search needs.

Shopify-Specific Considerations

One thing to keep in mind: Shopify's native Storefront API has built-in product search capabilities. For 2025, Shopify's Search & Discovery app does apply to headless storefronts using the Storefront API, so you get some merchandising and synonym features. However, the search relevance and customization options are more limited compared to dedicated search solutions. If your search UX requirements are "substantial" as you mentioned, you'll likely want a dedicated solution.

Gatsby Integration

For Gatsby specifically:

  • gatsby-plugin-algolia is the most mature and well-documented option with excellent Gatsby integration
  • For Typesense and Meilisearch, you'll need to set up indexing manually (often via webhooks or build-time scripts) and use their JavaScript client libraries in your Gatsby components

Sanity + Search Solutions

Since you're in the Sanity community, I should mention that if you're using Sanity as your content layer alongside Shopify, the sanity-algolia toolkit makes Algolia integration very smooth. It handles automatic indexing of your Sanity content using webhooks and serverless functions. The same pattern works for other search providers, though you'd need to build the integration yourself.

With Sanity Functions (the modern serverless compute within Sanity), you could set up event-driven indexing to any search provider when your content changes - whether that's Algolia, Typesense, Meilisearch, or others. This is now the preferred approach over traditional webhooks since Functions run natively within Sanity's infrastructure with better security and no external hosting needed.

My Recommendation

If you're looking to balance power, cost, and complexity:

  1. Start with Typesense if you want Algolia-like features at a fraction of the cost
  2. Try Meilisearch if you value simplicity and ease of setup
  3. Stick with Algolia if you need the most mature ecosystem and don't mind the premium pricing
  4. Consider Shopify's native search only if your requirements are basic

For Gatsby, you'll have the smoothest experience with Algolia due to gatsby-plugin-algolia, but the cost savings with Typesense or Meilisearch might be worth the extra integration effort, especially on a substantial project where search costs could add up.

Hope this helps! Let me know which direction you end up going - always interesting to hear what works for different use cases.

i mean sanities new search could actually handle it for you?
gatsby really isn’t that expensive if you only leverage it for search
people don’t search as everyone thinks
and the available tiers are flexible
but i also build my own json files and fuse/lunr js search those for anyone scared of algolia
will probably shift to sanity search now
json files and fuse/lunr js search
do you end up providing any sort of search analytics/dashboard Kevin?
Or do you just ensure search is properly plugged into GA and say
go get your search data there
?
for local json i bubble ga events
the algolia dashboard is rad… if the client actually opens it
Right.
Yeh, it's a fair point about folks overestimating search.
We've had consistent experiences with some of the middle-weight solutions on Shopify like Searchanise. Just trying to assess our headless parity.
Thanks again.
Cheers
user L
🙏
To echo this, for some use cases Algolia is great. We don’t offer faceted search for example, but we should be able to handle more cases directly from GROQ now. In addition for smaller sets running Fuse against a client cache of all relevant fields is both fast and flexible.

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?