# Exact word and full text search togther

**URL:** <https://discuss.elastic.co/t/exact-word-and-full-text-search-togther/52495>\
**Category:** Elasticsearch\
**Created:** [June 11, 2016, 10:26am UTC](https://discuss.elastic.co/t/exact-word-and-full-text-search-togther/52495 "2016-06-11T10:26:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarlok](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tarlok](https://discuss.elastic.co/u/tarlok)\
**Post date:** [June 11, 2016, 10:26am UTC](https://discuss.elastic.co/t/exact-word-and-full-text-search-togther/52495/1 "2016-06-11T10:26:34Z")

</div>

Hi,

I want to activate exact word and full text search simultaneously. Exact word search is working fine with not\_analyzed index and fulltext search is working fine with analyzed index. Now I want to combine both these. Below is example what exactly I want:

Suppose I have two records :

1. This is apple
2. apple  
If user search for "apple" then there should be one result (exact word search) but if user search for "apple\*" then there must be two records (full text search).

Please help me.

Thanks  
Tarlok

---

<div class="post-metadata">

**Author:** ![tarlok](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tarlok](https://discuss.elastic.co/u/tarlok)\
**Post date:** [June 12, 2016, 1:15pm UTC](https://discuss.elastic.co/t/exact-word-and-full-text-search-togther/52495/2 "2016-06-12T13:15:53Z")

</div>

Hi,

I am able perform both exact word and full-text search. I have mapped fields to not\_analyzed index then using wildcard for full-text and filter/terms for exact search. So I am done almost all stuff. Now last issue I am facing how to use wildcard for multiple fields.

Below is wildcard query:  
"query": {  
"wildcard": {  
"Field1": {  
"value": "_apple_"  
}  
}  
}

I have multiple fields Field1,Field2....FieldN. I have to search same value for all fileds. I tried:  
"query": {  
"wildcard": {  
"Field1": {  
"value": "_apple_"  
} ,  
"Field2": {  
"value": "_apple_"  
}  
}  
}

but it only shows result of last field (in above case Field2).

Actually I don't want to make queries for all fields and combine there result to a single resultset. I think there must be single query to get result of all fields. Please help me.

Thanks  
Tarlok

---

<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 5, 2017, 10:44pm UTC](https://discuss.elastic.co/t/exact-word-and-full-text-search-togther/52495/3 "2017-07-05T22:44:31Z")

</div>


