DSL Query: LIKE Condition of SQL

Hi
Basically I need to perform a search similar to LIKE condition in SQL.

Ex. Index.ColumnA LIKE Index.ColumnX

In other words I need to verify if ColumnA contains or match with Column B. It's important mention that it is not neccesary that both columns have be equals.

Regards

I don't think this can be easily done. May be with a script though? https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-query.html

Thanks a lot your help.

I found the following script to done, but now I need set the value of my_value with value of other field, for example my_value : "user_name".

Do you know if exist the posibility to perform this?

{
"inline" : {
"query": { "wildcard" : { "{{my_field}}" : "{{my_value}}" } },
"size" : "{{my_size}}"
},
"params" : {
"my_field" : "account_name",
"my_value" : "James",
"my_size" : 5
}
}

I told you already that I don't think it's possible without a script.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.