-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bughelp wantedadoptmeadoptme
Description
When querying across multiple fields of different types in Query String Query, if there is a mismatch between the data type of the query string and the data type of the queried field, then an exception occurs. When a similar search is run via multi_match
, no issue is observed. Tested under ES 5.2.0
PUT /tester22/
{
"mappings": {
"test": {
"properties": {
"Product": {
"properties": {
"Id": {
"type": "string"
},
"IsBlue": {
"type": "boolean"
},
"Inventory": {
"type": "long"
}
}
}
}
}
}
}
POST /tester22/test
{
"Product":{
"Id": "asdf",
"IsBlue" : false,
"Inventory" : 234
}
}
Results in number_format_exception
:
GET /tester22/_search
{
"query": {
"query_string": {
"query": "Product.\\*:asdf"
}
}
}
Works seamlessly:
GET /tester22/_search
{
"query": {
"multi_match": {
"query": "asdf",
"type": "cross_fields",
"operator": "and",
"fields": [ "Product.*" ]
}
}
}
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bughelp wantedadoptmeadoptme