Terms Query by index in dashboards

I am currently using Terms Query by index to filter a query:

{
          "query": {
            "bool": {
              "must": [
                {
                  "terms": {
                    "test.type.name": {
                      "index": "test-type-index",
                      "id": "unit-test",
                      "path": "type.name"
                    }
                  }
                },
                {
                  "term": {
                    "test.env": {
                      "value": "dev"
                    }
                  }
                }
              ]
            }
          }
    }

Example of test-type-index:

{
        "_index": "test-type-index",
        "_id": "unit-test",
        "_score": 1.0,
        "_source": {
          "type": [
            {
              "name": "test1",
            },
            {
              "name": "test2",
            }
          ]
        }
      }
}

I am trying to create a dashboard based on this query.
How can I create these visualisations?

  • Create visualisation based on the above query. I managed to use DSL to filter the results in discover using this query but not the visualisation.
  • Create an option list of test-type-index ids then use the type names to filter another visualisation.

Hey there, did you find your response? What kind of visualization do you have in mind?

No, it is not possible to use DSL inside the visualisation. And using option list in the query is a feature that ES team is working on AFAIK.

Yes, but you still can filter the visualization by dsl query filter. You cannot use dsl as a visualization source though.

I understand, but I am looking for a way to use DSL in the visualisation.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.