Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ElasticSearch vs SQL Full Text Search [closed]

I want to use full text search in my project... Can anyone explain me, what is the difference between ElasticSearch and SQL Full Text Search

Or

why SQL Full Text Search is better (worse) than elastic?

documentations, presentations, schema...

like image 952
Adam Bremen Avatar asked Dec 11 '13 09:12

Adam Bremen


People also ask

Does SQL Server support full text search?

Full-Text Search in SQL Server and Azure SQL Database lets users and applications run full-text queries against character-based data in SQL Server tables.

What is ElasticSearch full text search?

Overview. Full-text search queries and performs linguistic searches against documents. It includes single or multiple words or phrases and returns documents that match search condition. ElasticSearch is a search engine based on Apache Lucene, a free and open-source information retrieval software library.

Why is ElasticSearch faster than SQL?

Instead of having to search through the entire document or row space for a given value, the system can find that value in its internal index and immediately know which documents or rows contain it. This, of course, makes querying significantly faster.

What is the advantage of a full text search?

Conclusion. Users searching full text are more likely to find relevant articles than searching only abstracts. This finding affirms the value of full text collections for text retrieval and provides a starting point for future work in exploring algorithms that take advantage of rapidly-growing digital archives.


1 Answers

Define "better"... sql full text search is fairly trivial to get working (indexing and query) - but it has penalties:

  • very little (virtually no) control over how things are indexed (what the index keys are; what the lexers/stemmers/etc are; etc)
  • runs on the sql server - which is usually your least scalable infrastructure

Elastic search requires more work; you need to setup and maintain a dedicated cluster of nodes, and then provide code that performs the actual index operations, which may also involve a scheduled job that works from a change-log (processing new / edited data), building the fragments to be indexed; equally, you need to then take more time building the query. But you get a lot of control over the index and query, and scalability (a cluster can be whatever size you need). If it helps any, Stack Overflow grew up on sql full text search, then moved into elastic search when the limitations (both features and performance) proved prohibitive.

like image 129
Marc Gravell Avatar answered Oct 05 '22 21:10

Marc Gravell