We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text
Continuation of #1112. Reference: https://faridrener.com/2018/05/07/es-multiple-datatypes.html
DSL search requires exact types to match a function signature, but text fields could be of any type. Mapping:
{ "mappings": { "properties": { "TextWithMixedFields" : { "type" : "text", "fields" : { "numeric": { "type": "double", "ignore_malformed": true }, "date": { "type": "date", "format": "dd.MM.uuuu", "ignore_malformed": true } } } } } }
Data:
{"index": {}} { "TextWithMixedFields": "one two three" } {"index": {}} { "TextWithMixedFields": 42 } {"index": {}} { "TextWithMixedFields": "12.04.1961" }
Query 1:
select * from dbg where TextWithMixedFields > 0
Error:
{ "reason": "Invalid SQL query", "details": "> function expected {[BYTE,BYTE],[SHORT,SHORT],[INTEGER,INTEGER],[LONG,LONG],[FLOAT,FLOAT],[DOUBLE,DOUBLE],[TEXT,TEXT],[STRING,STRING],[BOOLEAN,BOOLEAN],[DATE,DATE],[TIME,TIME],[DATETIME,DATETIME],[TIMESTAMP,TIMESTAMP],[INTERVAL,INTERVAL],[STRUCT,STRUCT],[ARRAY,ARRAY]}, but get [STRING,INTEGER]", "type": "ExpressionEvaluationException" }
Query 2:
select * from dbg where TextWithMixedFields.numeric > 0;
{ "reason": "Invalid SQL query", "details": "can't resolve Symbol(namespace=FIELD_NAME, name=TextWithMixedFields.numeric) in type env", "type": "SemanticCheckException" }
A user should be able to search text for all type of fields. Query 1:
Should fail with another error message OR automatically resolve field name and behave as second query. Query 2:
Should return
+-----------------------+ | TextWithMixedFields | |-----------------------| | 42 | +-----------------------+
N/A
This feature depends #1038, #1112 and #1113.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Continuation of #1112.
Reference: https://faridrener.com/2018/05/07/es-multiple-datatypes.html
Is your feature request related to a problem?
DSL search requires exact types to match a function signature, but
text
fields could be of any type.Mapping:
Data:
Query 1:
Error:
Query 2:
Error:
What solution would you like?
A user should be able to search text for all type of fields.
Query 1:
Should fail with another error message OR automatically resolve field name and behave as second query.
Query 2:
Should return
What alternatives have you considered?
N/A
Do you have any additional context?
This feature depends #1038, #1112 and #1113.
The text was updated successfully, but these errors were encountered: