# Field Search Issue

**URL:** <https://discuss.elastic.co/t/field-search-issue/7083>\
**Category:** Elasticsearch\
**Created:** [March 21, 2012, 11:16am UTC](https://discuss.elastic.co/t/field-search-issue/7083 "2012-03-21T11:16:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticUsers](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@ElasticUsers](https://discuss.elastic.co/u/ElasticUsers)\
**Post date:** [March 21, 2012, 11:16am UTC](https://discuss.elastic.co/t/field-search-issue/7083/1 "2012-03-21T11:16:29Z")

</div>

Hi Team,

We have defined mapping for a field as follows :

"host":{  
"omit\_term\_freq\_and\_positions":true,  
"omit\_norms":true,"type":"string"  
}

When we query for host value "londc0002.eur.xl" we are not getting any docs. Query is -

"query" : {  
"query\_string" : {  
"query" : "+host:"londc0002.eur.xl"",  
"default\_operator" : "and",  
"analyzer" : "search\_analyzer",  
"allow\_leading\_wildcard" : false,  
"analyze\_wildcard" : true  
}  
}

But when we query for the host value "10.1.0.0", we are getting back the data. Query is formed like -

"query" : {  
"query\_string" : {  
"query" : "+host:"10.1.0.0"",  
"default\_operator" : "and",  
"analyzer" : "search\_analyzer",  
"allow\_leading\_wildcard" : false,  
"analyze\_wildcard" : true  
}  
}

Both the terms "10.1.0.0" and "londc0002.eur.xl" exists for the host field.

Please provide your input.

Thanks..

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [March 21, 2012, 2:50pm UTC](https://discuss.elastic.co/t/field-search-issue/7083/2 "2012-03-21T14:50:03Z")

</div>

If you are using standard analyzer for the host field, the value  
"londc0002.eur.xl" is translated into two tokens "londc0002" and "eur.xml"  
and then elasticsearch is trying to perform phrase search with these two  
tokens and it fails because omit\_term\_freq\_and\_positions is set to false.  
It's basically the same issue as  
[http://elasticsearch-users.115913.n3.nabble.com/Search-Issue-tc3824928.html](http://elasticsearch-users.115913.n3.nabble.com/Search-Issue-tc3824928.html)

On Wednesday, March 21, 2012 7:16:29 AM UTC-4, Kranti wrote:

> Hi Team,
> 
> We have defined mapping for a field as follows :
> 
> "host":{  
> "omit\_term\_freq\_and\_positions":true,  
> "omit\_norms":true,"type":"string"  
> }
> 
> When we query for host value "londc0002.eur.xl" we are not getting any  
> docs.  
> Query is -
> 
> "query" : {  
> "query\_string" : {  
> "query" : "+host:"londc0002.eur.xl"",  
> "default\_operator" : "and",  
> "analyzer" : "search\_analyzer",  
> "allow\_leading\_wildcard" : false,  
> "analyze\_wildcard" : true  
> }  
> }
> 
> But when we query for the host value "10.1.0.0", we are getting back the  
> data. Query is formed like -
> 
> "query" : {  
> "query\_string" : {  
> "query" : "+host:"10.1.0.0"",  
> "default\_operator" : "and",  
> "analyzer" : "search\_analyzer",  
> "allow\_leading\_wildcard" : false,  
> "analyze\_wildcard" : true  
> }  
> }
> 
> Both the terms "10.1.0.0" and "londc0002.eur.xl" exists for the host field.
> 
> Please provide your input.
> 
> Thanks..
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Field-Search-Issue-tp3845309p3845309.html](http://elasticsearch-users.115913.n3.nabble.com/Field-Search-Issue-tp3845309p3845309.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![ElasticUsers](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@ElasticUsers](https://discuss.elastic.co/u/ElasticUsers)\
**Post date:** [March 23, 2012, 4:28am UTC](https://discuss.elastic.co/t/field-search-issue/7083/3 "2012-03-23T04:28:14Z")

</div>

Any input on this ..

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [March 23, 2012, 2:07pm UTC](https://discuss.elastic.co/t/field-search-issue/7083/4 "2012-03-23T14:07:42Z")

</div>

Hi Kranti,

Was my answer unclear or are you asking for a second opinion?

Igor

On Friday, March 23, 2012 12:28:14 AM UTC-4, Kranti wrote:

> Any input on this ..
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.​115913.n3.nabble.com/Field-​Search-Issue-​tp3845309p3850705.html](http://elasticsearch-users.xn--115913-9e0c.n3.nabble.com/Field-%E2%80%8BSearch-Issue-%E2%80%8Btp3845309p3850705.html)[http://elasticsearch-users.115913.n3.nabble.com/Field-Search-Issue-tp3845309p3850705.html](http://elasticsearch-users.115913.n3.nabble.com/Field-Search-Issue-tp3845309p3850705.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![ElasticUsers](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@ElasticUsers](https://discuss.elastic.co/u/ElasticUsers)\
**Post date:** [March 26, 2012, 11:29am UTC](https://discuss.elastic.co/t/field-search-issue/7083/5 "2012-03-26T11:29:02Z")

</div>

Thanks a lot.

---

<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:34am UTC](https://discuss.elastic.co/t/field-search-issue/7083/6 "2017-07-06T03:34:48Z")

</div>


