What is the bug?
There is limitation on Multi-fields in WHERE Conditions
If a field is defined with multiple types, then SQL engine treat it as text_keyword.
How can one reproduce the bug?
For example if the field defined as
"id1" : {
"type" : "keyword",
"fields" : {
"id2" : {
"type" : "integer"
}
}
},
then following query
SELECT id1
FROM sample_data
WHERE n1 IN ('19') AND n2 IN ('299')
ORDER BY id1.id2 ASC LIMIT 10 OFFSET 0
will result in error
{
"error": {
"reason": "Invalid SQL query",
"details": "can't resolve Symbol(namespace=FIELD_NAME, name=id1.id2) in type env",
"type": "SemanticCheckException"
},
"status": 400
}
What is the expected behavior?
For multi-field (a text field with another keyword field inside), there should be no assumption that the keyword field name is always "keyword".
Query with above format should return expected result.
What is your host/environment?
- OS: [e.g. iOS]
- Version [e.g. 22]
- Plugins
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
What is the bug?
There is limitation on Multi-fields in WHERE Conditions
If a field is defined with multiple types, then SQL engine treat it as text_keyword.
How can one reproduce the bug?
For example if the field defined as
then following query
will result in error
What is the expected behavior?
For multi-field (a text field with another keyword field inside), there should be no assumption that the keyword field name is always "keyword".
Query with above format should return expected result.
What is your host/environment?
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.