In Kibana vega can we give index pattern with filters in data source

Hi I have to show all the data on index pattern with some filters. In discover I have school and I want to filter out all the students in grade 5. When I add the filter and see in discover it has 6000 records. But all records are more than 15k (Without filters). So in vega can i load the data source as index pattern with filters. Eg - index : 'school_system* {filter grade 5}'

data [
       "name" : "Grade5Students",
       "url" : {
             "index" : "school-system*" // I want to add filter as grade.keyword:5
       }
]

Because in vega it does not load more than 10k records. So i was wonder we can get by filtering in dex pattern or do the filter before loading all data. Multiple index pattens is not solution for my current one.

You can add a body and do any query or any aggregation that you want to shape the data before pulling it into Vega.

"name" : "Grade5Students",
"url" : {
 "index" : "school-system*",
 "body": {"query": {"bool": {"filter": [{"term": {"grade.keyword": 5}}]}}}
}

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