ES query - no pushdown for regex


#1

SQL query to ElasticSearch regex is not pushed down :

SELECT A, B, C
FROM traffic
where regexp_like(C, ‘%AAA%’)

–> generates a match_all query like this :
{
“from” : 0,
“size” : 4000,
“query” : {
“match_all” : {
“boost” : 1.0
}
}
}
while SQL with Like clause gets pushdown and converted to use regExp syntax
SELECT C, H
FROM traffic
where H like ‘%cnn%’

gets converted to
{
“from” : 0,
“size” : 4000,
“query” : {
“regexp” : {
“host” : {
“value” : “.ynet.”,
“flags_value” : 65535,
“max_determinized_states” : 10000,
“boost” : 1.0
}
}
}
}


#2

Hi @dorirabin

I can see a similar behavior on my test too. Let me get back to you on this

Thanks
@balaji.ramaswamy


#3

Thanks , I have similar issue with ORDER BY that is not pushed down in very simple select query


#4

Hi @balaji.ramaswamy
Did you find something about this regexp pushdown?
Thanks
@dorirabin


#5

Hi @dorirabin

Sorry for not responding earlier. We have filed an internal bug on this and will keep you posted

Thanks
@balaji.ramaswamy