You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Support match_phrase with push down when calcite is enabled #3668
###
PUT {{baseUrl}}/ppl_test_logs
Content-Type: application/x-ndjson
{
"mappings": {
"properties": {
"date": {
"type": "date_nanos"
},
"message": {
"type": "text"
}
}
}
}
###
POST {{baseUrl}}/ppl_test_logs/_doc
Content-Type: application/x-ndjson
{
"date": 1420070400,
"message": "This is a text field 1"
}
###
POST {{baseUrl}}/ppl_test_logs/_doc
Content-Type: application/x-ndjson
{
"date": 1420070400,
"message": "This is a text field 2"
}
explain query, match_phrase is not pushdown to DSL query when calcilte enabled.
Verified fixed on current main (built at commit 585fa9e53, OpenSearch 3.7.0-SNAPSHOT) with plugins.calcite.enabled=true.
Reproduced the scenario from the issue:
PUT /ppl_test_logs (mappings: date=date_nanos, message=text)
POST /ppl_test_logs/_doc {"date":1420070400,"message":"This is a text field 1"}
POST /ppl_test_logs/_doc {"date":1420070400,"message":"This is a text field 2"}
PUT /_cluster/settings {"transient":{"plugins.calcite.enabled": true}}
Explain output now shows match_phrase pushed down into both the PushDownContext and the actual DSL sourceBuilder:
Activity
penghuo commentedon May 29, 2026
Verified fixed on current
main(built at commit585fa9e53, OpenSearch 3.7.0-SNAPSHOT) withplugins.calcite.enabled=true.Reproduced the scenario from the issue:
Explain output now shows
match_phrasepushed down into both thePushDownContextand the actual DSLsourceBuilder:{ "calcite": { "physical": "CalciteEnumerableIndexScan(table=[[OpenSearch, ppl_test_logs]], PushDownContext=[[PROJECT->[message], FILTER->match_phrase(MAP('field', $0), MAP('query', 'field 2':VARCHAR)), LIMIT->10000], OpenSearchRequestBuilder(sourceBuilder={\"from\":0,\"size\":10000,\"timeout\":\"1m\",\"query\":{\"match_phrase\":{\"message\":{\"query\":\"field 2\",\"slop\":0,\"zero_terms_query\":\"NONE\",\"boost\":1.0}}},\"_source\":{\"includes\":[\"message\"]}}, requestedTotalSize=10000, pageSize=null, startFrom=0)])" } }Query also returns the expected single row (
"This is a text field 2"). Closing.