# Error while using wildcard in multifield query\_string query

**URL:** <https://discuss.elastic.co/t/error-while-using-wildcard-in-multifield-query-string-query/11902>\
**Category:** Elasticsearch\
**Created:** [May 9, 2013, 3:11pm UTC](https://discuss.elastic.co/t/error-while-using-wildcard-in-multifield-query-string-query/11902 "2013-05-09T15:11:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elias\_Levy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elias_levy/32/2335_2.png) [@Elias\_Levy](https://discuss.elastic.co/u/Elias_Levy)\
**Post date:** [May 9, 2013, 3:11pm UTC](https://discuss.elastic.co/t/error-while-using-wildcard-in-multifield-query-string-query/11902/1 "2013-05-09T15:11:20Z")

</div>

I've indexed some data with a field named "observed" that is an object with  
two other fields named "filename" and "pathname". These fields are  
analyzed and have multiple values.

The following query executed without problems:

```
 "query_string" : { "fields" : ["observed.filename", 

```

"observed.pathname"], "query" : "Autorun", "use\_dis\_max" : true }

but when I change it to the following it fails:

```
"query_string" : {
    "fields" : ["observed.*"],
    "query" : "Autorun",
    "use_dis_max" : true
}

```

with the error:

"SearchPhaseExecutionException[Failed to execute phase [query], total  
failure; shardFailures {[jHW46VKNS\_G6Cnrdzko\_WA][file\_analysis][0]:  
SearchParseException[[file\_analysis][0]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\t"query": {\t "query\_string" : {\t  
"fields" : ["observed._"],\t "query" : "Autorun",\t  
"use\_dis\_max" : true\t }\t}}]]]; nested: NumberFormatException[For  
input string: "Autorun"]; }{[jHW46VKNS\_G6Cnrdzko\_WA][file\_analysis][1]:  
SearchParseException[[file\_analysis][1]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\t"query": {\t "query\_string" : {\t  
"fields" : ["observed._"],\t "query" : "Autorun",\t  
"use\_dis\_max" : true\t }\t}}]]]; nested: NumberFormatException[For  
input string: "Autorun"]; }]

Why is that? The docs indicate it should work.

Also odd is that the following works:

```
"query_string" : {
    "fields" : ["observed.f*"],
    "query" : "Autorun",
    "use_dis_max" : true
}

```

but this fails:

```
"query_string" : {
    "fields" : ["observed.p*"],
    "query" : "Autorun",
    "use_dis_max" : true
}

```

I am Running 0.90.0. The mapping for the fields looks like:

"observed" : {  
"type": "object",  
"properties" : {  
"pathname" : { "type": "string", "analyzer": "path" },  
"filename" : {  
"type": "multi\_field",  
"fields": {  
"filename": { "type": "string", "analyzer": "path" },  
"whole" : { "type": "string", "analyzer": "lowercase\_keyword" }  
}  
},

There are some other fields in there as well.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Elias\_Levy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elias_levy/32/2335_2.png) [@Elias\_Levy](https://discuss.elastic.co/u/Elias_Levy)\
**Post date:** [May 10, 2013, 3:32pm UTC](https://discuss.elastic.co/t/error-while-using-wildcard-in-multifield-query-string-query/11902/2 "2013-05-10T15:32:54Z")

</div>

Bueller? Bueller?

Can someone from ES repo? Should I open an issue?

On Thu, May 9, 2013 at 5:11 PM, Elias Levy [fearsome.lucidity@gmail.com](mailto:fearsome.lucidity@gmail.com)wrote:

> I've indexed some data with a field named "observed" that is an object  
> with two other fields named "filename" and "pathname". These fields are  
> analyzed and have multiple values.
> 
> The following query executed without problems:
> 
> ```
> "query_string" : { "fields" : ["observed.filename",
> 
> ```
> 
> "observed.pathname"], "query" : "Autorun", "use\_dis\_max" : true }
> 
> but when I change it to the following it fails:
> 
> ```
> "query_string" : {
> "fields" : ["observed.*"],
> "query" : "Autorun",
> "use_dis_max" : true
> }
> 
> ```
> 
> with the error:
> 
> "SearchPhaseExecutionException[Failed to execute phase [query], total  
> failure; shardFailures {[jHW46VKNS\_G6Cnrdzko\_WA][file\_analysis][0]:  
> SearchParseException[[file\_analysis][0]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\t"query": {\t "query\_string" : {\t  
> "fields" : ["observed._"],\t "query" : "Autorun",\t  
> "use\_dis\_max" : true\t }\t}}]]]; nested: NumberFormatException[For  
> input string: "Autorun"]; }{[jHW46VKNS\_G6Cnrdzko\_WA][file\_analysis][1]:  
> SearchParseException[[file\_analysis][1]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\t"query": {\t "query\_string" : {\t  
> "fields" : ["observed._"],\t "query" : "Autorun",\t  
> "use\_dis\_max" : true\t }\t}}]]]; nested: NumberFormatException[For  
> input string: "Autorun"]; }]
> 
> Why is that? The docs indicate it should work.
> 
> Also odd is that the following works:
> 
> ```
> "query_string" : {
> "fields" : ["observed.f*"],
> "query" : "Autorun",
> "use_dis_max" : true
> }
> 
> ```
> 
> but this fails:
> 
> ```
> "query_string" : {
> "fields" : ["observed.p*"],
> "query" : "Autorun",
> "use_dis_max" : true
> }
> 
> ```
> 
> I am Running 0.90.0. The mapping for the fields looks like:
> 
> "observed" : {  
> "type": "object",  
> "properties" : {  
> "pathname" : { "type": "string", "analyzer": "path" },  
> "filename" : {  
> "type": "multi\_field",  
> "fields": {  
> "filename": { "type": "string", "analyzer": "path" },  
> "whole" : { "type": "string", "analyzer": "lowercase\_keyword" }  
> }  
> },
> 
> There are some other fields in there as well.
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/ELp\_zf0ZuSQ/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/ELp_zf0ZuSQ/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:37am UTC](https://discuss.elastic.co/t/error-while-using-wildcard-in-multifield-query-string-query/11902/3 "2017-07-06T02:37:08Z")

</div>


