opensearch-project / opensearch-project/sql

Support `filter` query parameter in the new engine

Open
#1,412 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug new-engine-gap SQL
Dominant language
Java
Stars
176
Forks
229
Avg merge
2d 21h
Merged PRs (30d)
43

Description

Support requests such as this:

>> curl -H 'Content-Type: application/json' -X POST localhost:9200/_plugins/_sql -d '{
  "query" : "SELECT firstname, lastname, balance FROM accounts",
  "filter" : {
    "range" : {
      "balance" : {
        "lt" : 10000
      }
    }
  }
}'

filter property is OpenSearch DSL that gets added to the query generated from the SQL expression.

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 at the new engine's handling of POST requests to /_plugins/_sql and trace how the SQL expression becomes a generated query. Add support for the OpenSearch DSL filter shown in the example, then verify that the range condition affects the returned accounts.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.