# Combine Exact/phrase search and \* to get results starting with firstname lastname\* - Robert will\*

**URL:** <https://discuss.elastic.co/t/combine-exact-phrase-search-and-to-get-results-starting-with-firstname-lastname-robert-will/282962>\
**Category:** Elasticsearch\
**Created:** [August 31, 2021, 9:01pm UTC](https://discuss.elastic.co/t/combine-exact-phrase-search-and-to-get-results-starting-with-firstname-lastname-robert-will/282962 "2021-08-31T21:01:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshmiteja\_salapu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lakshmiteja_salapu/32/75775_2.png) [@lakshmiteja\_salapu](https://discuss.elastic.co/u/lakshmiteja_salapu)\
**Post date:** [August 31, 2021, 9:01pm UTC](https://discuss.elastic.co/t/combine-exact-phrase-search-and-to-get-results-starting-with-firstname-lastname-robert-will/282962/1 "2021-08-31T21:01:24Z")

</div>

I want to search for Robert Will\*  
and expecting results that include Robert willow , Robert wills  
But I am getting documents that contain Robert Smith with street address 18 willow street  
Question 1) How to get results with Robert and willow next to each other  
Question 2) I know I can do phrase search "Robert Willow" but is there a way to combine phrase search and \* like "Robert will" \* to get all names starting  
Robert will\*

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 1, 2021, 8:48am UTC](https://discuss.elastic.co/t/combine-exact-phrase-search-and-to-get-results-starting-with-firstname-lastname-robert-will/282962/2 "2021-09-01T08:48:05Z")

</div>

Hey!

There are a couple of things to take a look at. First, you are probably searching across several fields, if a street address is returned. Second, you might be searching with the `OR` operator instead of `AND`, so that everything matching `Robert` is already a hit?

The solution to your first question is using a so-called phrase query to search for terms next to each other.

The solution to your second question might be the [search as you type field type](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/search-as-you-type.html).

Hope this helps as a start!

---

<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:** [September 29, 2021, 8:48am UTC](https://discuss.elastic.co/t/combine-exact-phrase-search-and-to-get-results-starting-with-firstname-lastname-robert-will/282962/3 "2021-09-29T08:48:37Z")

</div>

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