Plot with filter


#1

Hi,

I'm trying to create a simple visualization:
it's a chart line but where I want to consider in the aggregation only the logs that have to equal fields (that in this case are keyword).

I'm able to create the ES query but I need to plot it.

{
  "query": { 
    "bool": { 
      "must": [
        { "exists": { "field":"A"}},
        { "script" : {
          "script" : "doc['A.keyword'].value != doc['B.keyword'].value"
          }
        }
      ]
    }
  }
}

Thank you


(Stacey Gammon) #2

Try putting that query in the Edit Query DSL portion of the Add filter dialog:


#3

Thank you for the quick answer,
this works very well, but what if I want a visualization where in the same graph I there are two lines, one with the filtered values, and one with all the values?


#4

@Stacey_Gammon there's no way to do this?


(Stacey Gammon) #5

Might be able to do something in timelion, the expression language allows for a lot of flexibility and it's for time series data. Perhaps worth exploring!


(system) #6

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