opensearch-project / opensearch-project/sql

[FEATURE] PPL Add time modifiers to the multisearch command

Open
#5,148 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement PPL
Dominant language
Java
Stars
176
Forks
229
Avg merge
2d 21h
Merged PRs (30d)
43

Description

Is your feature request related to a problem?
N/A

What solution would you like?
I would like to use the time modifiers of the search command (earliest, latest) in the multisearch command as a more concise way to specify the time ranges for all subsearches.

e.g.

| multisearch earliest=-1d
    [search source=source1 | where field1='value1']
    [search source=source2 | where field2='value2']
| stats avg(field3)

could be equivalent to

| multisearch 
    [search earliest=-1d source=source1 | where field1='value1']
    [search earliest=-1d source=source2 | where field2='value2']
| stats avg(field3)

What alternatives have you considered?

  • using earliest and latest on all subsearches
  • filtering the multisearch with where and date operations

Do you have any additional context?
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the PPL multisearch and search commands parse and apply the earliest and latest modifiers. Compare the requested example with the current subsearch behavior, then verify that modifiers on multisearch apply consistently to every subsearch and that existing time-range behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.