Now days search emerged is a major issue for SAAS based companies. they want their services to be searched as soon as user thinks about the service with lightening speed with most striking results. but in today’s world where we have lots of unstructured data, it’s very complicated to figure out what the user thinking for and this thought involves search as a service architecture.
majorly we have two option available in this category:-
1) Elastic Search
ElasticSearch is an open source project which is based on Lucene, which is a famous Java-based open source engine.
ElasticSearch sweet spot is on big data search with unique differentiators on analytics and logs analysis with ELK but it’s a “do it yourself” product: you need to know the impacts of your configuration (there are often different ways to do something, which can have a big impact on performance), you also need to take the hosting & the maintenance on your own (like upgrading the version without impacting the queries, hardware sizing, and tuning, …).
Elasticsearch has two very broad use cases — enterprise search and analytics. Enterprise search can be further broken down to blog search, document search, people search, archival search, e-commerce product search, etc. Some of the features that are in demand include auto-complete/suggest, multi-select faceting, scoring, fuzzy search, “did you mean?” (spelling, grammar correction), and related searches (such as “users who bought x also bought y”). Both platforms do this well.
ElasticSearch has a ranking formula that assigns one unique score to each document and mixes a lot of information (tf–idf, attribute weights, proximity between words, …). It is difficult to control the consequence of a change. The sweet spot of this approach is on the indexing of big records (like webpages) because TF-IDF statistics are needed on big chunk of text.
2) Algolia Search
Algolia is a Hosted Search API that delivers instant and relevant results from the first keystroke its sweet spot is on user-facing search with unique differentiators on performance (designed for instant search, Distributed Search Network, …)
Algolia has a Tie-Breaking approach: Instead of assigning a matching score to each document it sort the results like you would do naturally with your brain. it first sort on the number of typos, then in case of equality it sort on the proximity between words, then on the order of attributes, …. You can easily control the relevance and add your business metrics even without search expertise. The sweet spot of this approach is on small structured data (database records).
Algolia was first written as an offline search engine for mobile devices (indexing & search were done directly on the device, no Internet connection required). That’s why its algorithms & data structures are very specific and optimized to run on very low resources. While moving to SAAS, this C++ SDK has been embedded as an nginx module on high-end servers (with addition of high-availability with a built-in replication on 3 hosts).
As always, open source vs. closed source needs to take both cost and portability into account. Algolia has a tiered subscription that depends on the number of records and the number of operations. Anybody can download Elasticsearch and run it locally for free.
In terms of performance Algolia overall seemed to have the best results, although Elasticsearch was not far behind. Once you factor in speed Algolia becomes the clear winner here. The only hesitation I have with Algolia is the price point. I just wished they offered a paid plan under $49 per month. For most small eCommerce sites, it makes it harder to justify the additional expense.
Also Algolia prohibits sharing a plan with multiple users. So developers and hosting providers won’t be able to simply offer this as an add-on to their customers. Even worse, there’s no affiliate program, meaning there’s little incentive to recommend them.