# How can I break down and diagnose this query error resulting in a NumberFormatException?

**URL:** <https://discuss.elastic.co/t/how-can-i-break-down-and-diagnose-this-query-error-resulting-in-a-numberformatexception/18718>\
**Category:** Elasticsearch\
**Created:** [July 17, 2014, 3:10pm UTC](https://discuss.elastic.co/t/how-can-i-break-down-and-diagnose-this-query-error-resulting-in-a-numberformatexception/18718 "2014-07-17T15:10:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryan_v/32/1376_2.png) [@Ryan\_V](https://discuss.elastic.co/u/Ryan_V)\
**Post date:** [July 17, 2014, 3:10pm UTC](https://discuss.elastic.co/t/how-can-i-break-down-and-diagnose-this-query-error-resulting-in-a-numberformatexception/18718/1 "2014-07-17T15:10:54Z")

</div>

I just converted our ES cluster from 0.90.12 to 1.1.1 and our app from  
NEST 0.12 to 1.0.0-rc1 and have had a really difficult time fixing all the  
breaking changes. I'm stuck on the following error. It occurs when I  
execute what is a rather complex search query:

{  
[my\_index][0]:  
RemoteTransportException[[search3.localdomain][inet[/172.31.xx.xx:9300]][search/phase/query]];  
nested: QueryPhaseExecutionException[[my\_index][0]:  
query[filtered(ConstantScore(cache(BooleanFilter(description.contains:[\* TO  
_])))^0.5 ConstantScore(cache(BooleanFilter(name.contains:[_ TO _])))^0.8  
ConstantScore(cache(BooleanFilter(description.snowball:[_ TO _])))  
ConstantScore(cache(BooleanFilter(name.snowball:[_ TO _])))^2.0  
ConstantScore(cache(BooleanFilter(stateName:[_ TO _])))^0.5  
ConstantScore(_:\*)^0.3)-\>cache(\_type:mysearchtype)],from[0],size[100]:  
Query Failed [Failed to execute main query]];  
nested: ElasticsearchException[java.lang.NumberFormatException: empty  
String];  
nested: UncheckedExecutionException[java.lang.NumberFormatException: empty  
String];  
nested: NumberFormatException[empty String];  
}

I'm just not quite sure how to debug that. The exact same query works on  
my 0.90.12 server but not on my 1.1.1 server. Here's the query (sanitized  
up a little)

{  
"from": 0,  
"size": 100,  
"sort": {  
"\_score": {  
"order": "desc"  
}  
},  
"facets": {  
"cityshortName": {  
"terms": {  
"field": "cityshortName",  
"size": 50,  
"order": "count"  
},  
"facet\_filter": {  
"and": {  
"filters": [{  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field":  
"companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}, {}]  
}  
}  
},  
"amenities.shortName": {  
"terms": {  
"field": "amenities.shortName",  
"size": 50,  
"order": "count"  
},  
"facet\_filter": {  
"and": {  
"filters": [{  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field":  
"companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}, {}]  
}  
}  
},  
"spaceEventTypes.shortName": {  
"terms": {  
"field": "spaceEventTypes.shortName",  
"size": 50,  
"order": "count"  
},  
"facet\_filter": {  
"and": {  
"filters": [{  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field":  
"companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}, {}]  
}  
}  
},  
"spaceType.shortName": {  
"terms": {  
"field": "spaceType.shortName",  
"size": 50,  
"order": "count"  
},  
"facet\_filter": {  
"and": {  
"filters": [{  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field":  
"companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}, {}]  
}  
}  
},  
"companyOrganizationName.keyword": {  
"terms": {  
"field": "companyOrganizationName.keyword",  
"size": 50,  
"order": "count"  
},  
"facet\_filter": {  
"and": {  
"filters": [{  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field":  
"companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}, {}]  
}  
}  
},  
"location": {  
"geo\_distance": {  
"location": "0, 0",  
"ranges": [{  
"from": 0.0,  
"to": 5.0  
}, {  
"from": 0.0,  
"to": 10.0  
}, {  
"from": 0.0,  
"to": 20.0  
}, {  
"from": 20.0,  
"to": 75.0  
}],  
"unit": "mi"  
},  
"facet\_filter": {  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field": "companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}  
}  
},  
"query": {  
"bool": {  
"should": [{  
"query\_string": {  
"query": "_",  
"default\_field": "description.contains",  
"default\_operator": "or",  
"boost": 0.5  
}  
}, {  
"query\_string": {  
"query": "_",  
"default\_field": "name.contains",  
"default\_operator": "or",  
"boost": 0.8  
}  
}, {  
"query\_string": {  
"query": "_",  
"default\_field": "description.snowball",  
"default\_operator": "or",  
"analyzer": "mysnowball"  
}  
}, {  
"query\_string": {  
"query": "_",  
"default\_field": "name.snowball",  
"default\_operator": "or",  
"analyzer": "mysnowball",  
"boost": 2.0  
}  
}, {  
"query\_string": {  
"query": "_",  
"default\_field": "stateFullName",  
"default\_operator": "or",  
"boost": 0.5  
}  
}, {  
"query\_string": {  
"query": "_",  
"default\_field": "\_all",  
"default\_operator": "or",  
"boost": 0.3  
}  
}]  
}  
},  
"filter": {  
"and": {  
"filters": [{  
"and": {  
"filters": [{}, {}, {}, {  
"fquery": {  
"query": {  
"query\_string": {  
"query": "Starbucks",  
"default\_field": "companyshortName",  
"analyzer": "whitespace"  
}  
}  
}  
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]  
}  
}, {}]  
}  
},  
"fields": [\< removed \>]  
}

Again, this query works against my 0.90.12 server but not 1.1.1. Can  
anyone shed some light on what might be happening? Is it a change in query  
execution? Or are my indexes set up differently? I'm just not sure how to  
diagnose that error message.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/34adf894-9849-46b5-b15e-90ac9bddcaf1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/34adf894-9849-46b5-b15e-90ac9bddcaf1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:15am UTC](https://discuss.elastic.co/t/how-can-i-break-down-and-diagnose-this-query-error-resulting-in-a-numberformatexception/18718/2 "2017-07-06T01:15:10Z")

</div>


