# What will be the correct search query?

**URL:** https://discuss.elastic.co/t/what-will-be-the-correct-search-query/5350
**Category:** Elasticsearch
**Created:** [September 12, 2011, 5:14am UTC](https://discuss.elastic.co/t/what-will-be-the-correct-search-query/5350 "2011-09-12T05:14:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)
#### Post date: [September 12, 2011, 5:14am UTC](https://discuss.elastic.co/t/what-will-be-the-correct-search-query/5350/1 "2011-09-12T05:14:16Z")

</div>

Hi

I want to search more near search data ,for example if i have index  
with following data:

## Index Data

## phone number sex age email first name last name

if want to search 'phone no' in my index then most near search will be  
'phone number'.if i search for 'name' then most near search will be  
'first name' and 'last name' or if search for 'age' the exact match  
will be 'age'.which query will help me to get those type of searching  
result using java API.

Thanks

---

<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: [July 6, 2017, 3:54am UTC](https://discuss.elastic.co/t/what-will-be-the-correct-search-query/5350/2 "2017-07-06T03:54:45Z")

</div>


