# What is elasticsearch best feature to achieve what I need?

**URL:** https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360
**Category:** Elasticsearch
**Created:** [March 5, 2021, 11:57am UTC](https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360 "2021-03-05T11:57:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nuno\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nuno_oliveira/32/85046_2.png) [@Nuno\_Oliveira](https://discuss.elastic.co/u/Nuno_Oliveira)
#### Post date: [March 5, 2021, 11:57am UTC](https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360/1 "2021-03-05T11:57:01Z")

</div>

Hi, I'm relatively new to elasticsearch and I'm not sure what is the best approach to achieve what I want, but this is what I've been trying:

I have a list of dog breeds in an Index and given the input "0293 Corki USA" to elasticsearch I want to get the breed "Corki" in return, just one best match.

1. The input breed can have multiple words. E.g German Shepard.
2. There is the possibility of having some trash in the input, like "0293".
3. It is possible that there are misspelled inputs. E.g. Corik instead of Corki.
4. I want to avoid false positives as much as possible. For example Input "English Terrier" and get "English Setter" as result.

I've been focusing on using Match Phrase Query and getting mixed results. Right now I'm exploring Phrase Suggester and try to use the suggestions as possible results.

Do I have better options to accomplish this?

---

<div class="post-metadata">

### Author: ![mayya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayya/32/83147_2.png) [@mayya](https://discuss.elastic.co/u/mayya)
#### Post date: [March 5, 2021, 9:07pm UTC](https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360/2 "2021-03-05T21:07:44Z")

</div>

@Nuno_Oliveira Finding relevant results is quite complex topic and requires a lot of experimentation. I found [Relevant Search book by Doug Turnbull](https://www.amazon.ca/Relevant-Search-applications-Solr-Elasticsearch/dp/161729277X/ref=sr_1_1?dchild=1&keywords=Relevant+Search%3A+With+applications+for+Solr+and+Elasticsearch&qid=1614978361&sr=8-1) to be very useful.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [March 6, 2021, 2:54am UTC](https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360/3 "2021-03-06T02:54:00Z")

</div>

Hi @Nuno_Oliveira Welcome to the community.

In addition to @mayya 's excellent suggestion if you are new to search in general perhaps you should take a look at Elastic App Search (there are free / basic version). There is some pretty powerful search and relevance tuning capabilities that are fairly easy to use through an interface it might provide a good way to learn about it and meet your objectives.

[Here](https://www.elastic.co/training/app-search-quick-start) is a quick start training to App Search to get you up and running quickly.

If you are good with just starting with Docs [here](https://www.elastic.co/guide/en/app-search/current/getting-started.html) are the App Search Docs

---

<div class="post-metadata">

### Author: ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)
#### Post date: [March 6, 2021, 8:52am UTC](https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360/4 "2021-03-06T08:52:21Z")

</div>

A common technique is to stack multiple interpretations of the user’s search input string in different query clauses within one request to elasticsearch. Only one clause has to match but the more that match the better. Each clause differs in terms of strictness and a boost can be given to the clauses to make stricter clause matches rank the highest. A “bool” query is used to contain the various clauses in a “should” array.  
The clauses you can use in order of strictness are:

- match\_phrase - all words have to match in the right order
- match with AND - all words must be somewhere in the document
- match with OR - at least one of the words must be in the document (more matching words = more score)
- fuzzy or “ngram” matching - match on bits of words rather than whole words.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 3, 2021, 8:52am UTC](https://discuss.elastic.co/t/what-is-elasticsearch-best-feature-to-achieve-what-i-need/266360/5 "2021-04-03T08:52:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
