Databases & Data Storage
Full-Text Search
Definition
Full-text search is a technique for searching a single computer-stored document or a collection in a full-text database. It examines all of the words in every stored document as it tries to match search criteria.
Why It Matters
Full-text search provides more intelligent and relevant search results than simple string matching (like the SQL `LIKE` operator). It can handle stemming (e.g., searching for "run" also finds "running"), stop words, and relevance ranking.
Contextual Example
An e-commerce website uses a full-text search engine like Elasticsearch to power its product search. When a user searches for "running shoes," it returns the most relevant results, even if the product title is just "runner shoe."
Common Misunderstandings
- While some relational databases have built-in full-text search capabilities, specialized search engines like Elasticsearch and OpenSearch are often used for more advanced use cases.
- This technology is what powers the search functionality of most major websites.