opensearch-project / opensearch-project/sql
[FEATURE] PPL parse command should support substring match
@songkant-aws is already working on this.
Since Jul 8, 2025.
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
Is your feature request related to a problem?
PUT my-index-000001/_doc/1
{ "log": "response {200 map {\"code\":\"449\",\"msg\":\"session has expired\"} false}\n" }
### no match
POST _plugins/_ppl
{
"query": """
source = my-index-000001 | WHERE match(log, "response") | parse lambdalog 'msg\":\"(?<msg>[^\"]+)' | fields msg;
"""
}
### matched
POST _plugins/_ppl
{
"query": """
source = my-index-000001 | WHERE match(log, "response") | parse lambdalog '.+msg\":\"(?<msg>[^\"]+).*\n?' | fields msg;
"""
}
What solution would you like?
Currently, parse using matcher.matches which requried the regex match the entire string.
We can consider change to matcher.find to match substring.
More reading, https://stackoverflow.com/questions/4450045/difference-between-matches-and-find-in-java-regex
What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.
Do you have any additional context?
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.