Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opensearch DSL JSON filters #529

Open
TheSkorm opened this issue Dec 23, 2024 · 1 comment
Open

Opensearch DSL JSON filters #529

TheSkorm opened this issue Dec 23, 2024 · 1 comment

Comments

@TheSkorm
Copy link

Is your feature request related to a problem? Please describe.
In Kibana we are able to filter on a geo polygon by using Opensearch DSL filters. Neither PPL or Lucene seem to support performing doing this sort of filtering making it seemingly impossible to limit a query to a geobounded area in grafana?

Example:

{
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "match_all": {}
        },
        {
          "geo_polygon": {
            "ignore_unmapped": true,
            "position": {
              "points": [
                {
                  "lat": 49.54579181266566,
                  "lon": -127.80458651044142
                },
                {
                  "lat": 49.943546607441135,
                  "lon": -121.47903557366045
                },
                {
                  "lat": 50.11301536527589,
                  "lon": -93.18976610639004
                }
              ]
            }
          }
        }
    }
  }
}

Describe the solution you'd like
Ability to add, extend or manually define the query json to allow adding things like geo_polygon to the request.

Describe alternatives you've considered

I tried to search for ways to perform the filtering using transforms in the frontend and couldn't find anything suitable

Additional context
In this specific case we want to filter on a certain region however having the option to manually define the query section can make certain searches easier or more performant than whats currently available. Or maybe I'm missing something or some option and this is already available?

@idastambuk
Copy link
Contributor

Hi @TheSkorm, unfortunately the OpenSearch plugin doesn't support raw query filtering apart from Lucene like OpenSearch dashboards does.

We have plans to evaluate this feature request as part of adding raw query JSON support in the future; however, we don't have an ETA for this.
I will add this to our backlog so we can track it and update it once we have more info.

@idastambuk idastambuk moved this from Incoming to Backlog in AWS Datasources Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants