Why my search query didn't match? Explained
Every time you build a search solution, you're faced with various challenges understanding why certain search queries don't lead to desired results. We're used to great relevant responses returned by Google, but not every company has Google's resources to build a similar search.
We'll look at Full-text search engines and how they work internally to match user input keywords. We'll take couple examples of Elasticsearch/Solr/Lucene queries, deconstruct them and see what contributes to the relevance of search results score
You'll learn about:
- How to use EXPLAIN query to understand what contributed to search relevance score
- Tokenization, stemming and other analysis techniques
- Phrase matching and proximity search
- Autocomplete search with edge-n-gram and partial search with n-gram filters
- Boosting results by specific field or boosting using separate functions
Examples would be provided in Elasticsearch, but apply similarly to Solr and Lucene