From the course: Elasticsearch Essential Training

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Working with term queries

Working with term queries

- [Instructor] Assume that you are running an e-commerce platform, and you need to find the product in a specific category, maybe let's say electronics, or maybe you've got a customer complaint, and you want to look the details for a specific customer email. Now, in those cases, you don't need a kind of a relative search, but you need exact matches. For that, in Elasticsearch, we use the term queries. Let's just see how we can use these term queries. The term query is searches for the exact matches. It does not do any kind of analysis or tokenization. It just a pure precision. For example, imagine that I wanted to find out all the product where the category is electronics, and if I do a search here, I can see all the product related to this electronics. Also remember that it's doing an exact search, so even if there is a mismatch, in terms of the case sensitiveness, you won't find any result. So it's doing an exact match including the case sensitivity. If you wanted to search for the…

Contents