I have a bar chart with x axis aggregating based on term "term1" with bars filtered by "*" and "field1=true". The query is term2=B.
Now I want to expand the possible hits and instead of looking only into term2=B, term2 should be any of the latest (unique on term2) 10 entries.
Example:
entry1: term2=B1, term1=A1, field1=true, timestamp=now-5m
entry2: term2=B1, term1=A1, field1=true, timestamp=now-5m
entry3: term2=B10, term1=A1, field1=true, timestamp=now-4m
entry4: term2=B9, term1=A1, field1=true, timestamp=now-4m
entry5: term2=B8, term1=A1, field1=true, timestamp=now-3m
entry6: term2=B7, term1=A1, field1=true, timestamp=now-2m
entry7: term2=B6, term1=A1, field1=true, timestamp=now-2m
entry8: term2=B5, term1=A1, field1=true, timestamp=now-2m
entry9: term2=B4, term1=A1, field1=true, timestamp=now-2m
entry10: term2=B3, term1=A1, field1=true, timestamp=now-1m
entry11: term2=B2, term1=A1, field1=false, timestamp=now-1m
entry12: term2=B1, term1=A1, field1=true, timestamp=now
My query would need to separate entry3-entry12 (term2:[B1 to B10]) as the population for the visualization.
I simply couldn't find a way to add "sort"/"order" to the query DSL. Is there a way?
Thanks