TimeLion Question

(Perry) #1

I have an index that I can use to filter my data using this:
agencyid:1 AND _type:FooBar. This works and shows the expected data

Now I have a Timelion visualization that I would like to use and apply the same filter.

When I try this:
.es(index=craig, timefield=incidentdate, metric=count q=agencyid:1 AND _type:FooBar).color(blue).lines(2).label("This Time Period").legend(ne,2). If I remove everything after the AND, I get data but it is not what I need.

I get a flat line across at the zero showing no activity. Can someone help me out and explain how to get this filter to work?

(Jon Budzenski) #2

I believe you need to wrap the query in quotes, e.g.

.es(index=craig, timefield=incidentdate, metric=count q="agencyid:1 AND _type:FooBar").color(blue).lines(2).label("This Time Period").legend(ne,2)

(Perry) #3

Thank you very much that worked!

(system) #4

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