Am using version 6.2.4
Am using a UI library called Reactive search to connect to elastic search
{"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"must":{"query_string":{"query":"test data","fields":["title^3000","description^50","title.analysed^100","description.analysed^20","date","metadata.createdBy","metadata.author","metadata.products","metadata.country","metadta.region","metadata.spaceKey^0.1","metadata.path","metadata.tags^0.1","metadata.channel^0.1","metadata.key"],"type":"best_fields","default_operator":"and","fuzziness":1,"phrase_slop":2}},"should":[{"range":{"date_original":{"boost":100,"gte":"now-1d/d"}}},{"range":{"date_original":{"boost":90,"gte":"now-7d/d"}}},{"range":{"date_original":{"boost":80,"gte":"now-14d/d"}}},{"range":{"date_original":{"boost":70,"gte":"now-1M/M"}}},{"range":{"date_original":{"boost":50,"gte":"now-3M/M"}}},{"range":{"date_original":{"boost":30,"gte":"now-6M/M"}}},{"range":{"date_original":{"boost":10,"gte":"now-12M/M"}}}],"filter":{"terms":{"docType.keyword":["Box","Confluence","IntegrationDirectory","DevPortal","MTSFaq","Postman","ProductCentral","StackOverflow","Tools","CircleHD","GitHub","Jira","CartRef"]}}}}]}}]}},"highlight":{"force_source":true,"pre_tags":["<mark>"],"post_tags":["</mark>"],"fields":{"description.analysed":{},"description":{},"title.analysed":{},"title":{}},"number_of_fragments":0},"size":0,"aggs":{"docType.keyword":{"terms":{"field":"docType.keyword","size":100,"order":{"_term":"asc"}}}}}
{"preference":"Products"}
{"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"must":{"query_string":{"query":"test data","fields":["title^3000","description^50","title.analysed^100","description.analysed^20","date","metadata.createdBy","metadata.author","metadata.products","metadata.country","metadta.region","metadata.spaceKey^0.1","metadata.path","metadata.tags^0.1","metadata.channel^0.1","metadata.key"],"type":"best_fields","default_operator":"and","fuzziness":1,"phrase_slop":2}},"should":[{"range":{"date_original":{"boost":100,"gte":"now-1d/d"}}},{"range":{"date_original":{"boost":90,"gte":"now-7d/d"}}},{"range":{"date_original":{"boost":80,"gte":"now-14d/d"}}},{"range":{"date_original":{"boost":70,"gte":"now-1M/M"}}},{"range":{"date_original":{"boost":50,"gte":"now-3M/M"}}},{"range":{"date_original":{"boost":30,"gte":"now-6M/M"}}},{"range":{"date_original":{"boost":10,"gte":"now-12M/M"}}}],"filter":{"terms":{"docType.keyword":["Box","Confluence","IntegrationDirectory","DevPortal","MTSFaq","Postman","ProductCentral","StackOverflow","Tools","CircleHD","GitHub","Jira","CartRef"]}}}}]}}]}},"highlight":{"force_source":true,"pre_tags":["<mark>"],"post_tags":["</mark>"],"fields":{"description.analysed":{},"description":{},"title.analysed":{},"title":{}},"number_of_fragments":0},"size":0,"aggs":{"metadata.products.keyword":{"terms":{"field":"metadata.products.keyword","size":10,"order":{"_count":"desc"}}}}}
{"preference":"Region"}
{"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"must":{"query_string":{"query":"test data","fields":["title^3000","description^50","title.analysed^100","description.analysed^20","date","metadata.createdBy","metadata.author","metadata.products","metadata.country","metadta.region","metadata.spaceKey^0.1","metadata.path","metadata.tags^0.1","metadata.channel^0.1","metadata.key"],"type":"best_fields","default_operator":"and","fuzziness":1,"phrase_slop":2}},"should":[{"range":{"date_original":{"boost":100,"gte":"now-1d/d"}}},{"range":{"date_original":{"boost":90,"gte":"now-7d/d"}}},{"range":{"date_original":{"boost":80,"gte":"now-14d/d"}}},{"range":{"date_original":{"boost":70,"gte":"now-1M/M"}}},{"range":{"date_original":{"boost":50,"gte":"now-3M/M"}}},{"range":{"date_original":{"boost":30,"gte":"now-6M/M"}}},{"range":{"date_original":{"boost":10,"gte":"now-12M/M"}}}],"filter":{"terms":{"docType.keyword":["Box","Confluence","IntegrationDirectory","DevPortal","MTSFaq","Postman","ProductCentral","StackOverflow","Tools","CircleHD","GitHub","Jira","CartRef"]}}}}]}}]}},"highlight":{"force_source":true,"pre_tags":["<mark>"],"post_tags":["</mark>"],"fields":{"description.analysed":{},"description":{},"title.analysed":{},"title":{}},"number_of_fragments":0},"size":0,"aggs":{"metadata.region.keyword":{"terms":{"field":"metadata.region.keyword","size":5,"order":{"_count":"desc"}}}}}
{"preference":"result"}
{"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"must":{"query_string":{"query":"test data","fields":["title^3000","description^50","title.analysed^100","description.analysed^20","date","metadata.createdBy","metadata.author","metadata.products","metadata.country","metadta.region","metadata.spaceKey^0.1","metadata.path","metadata.tags^0.1","metadata.channel^0.1","metadata.key"],"type":"best_fields","default_operator":"and","fuzziness":1,"phrase_slop":2}},"should":[{"range":{"date_original":{"boost":100,"gte":"now-1d/d"}}},{"range":{"date_original":{"boost":90,"gte":"now-7d/d"}}},{"range":{"date_original":{"boost":80,"gte":"now-14d/d"}}},{"range":{"date_original":{"boost":70,"gte":"now-1M/M"}}},{"range":{"date_original":{"boost":50,"gte":"now-3M/M"}}},{"range":{"date_original":{"boost":30,"gte":"now-6M/M"}}},{"range":{"date_original":{"boost":10,"gte":"now-12M/M"}}}],"filter":{"terms":{"docType.keyword":["Box","Confluence","IntegrationDirectory","DevPortal","MTSFaq","Postman","ProductCentral","StackOverflow","Tools","CircleHD","GitHub","Jira","CartRef"]}}}}]}}]}},"highlight":{"force_source":true,"pre_tags":["<mark>"],"post_tags":["</mark>"],"fields":{"description.analysed":{},"description":{},"title.analysed":{},"title":{}},"number_of_fragments":0},"size":10,"from":0,"sort":[{"_score":{"order":"desc"}}]}
I have a set of UI side filters such as Products, DocType etc .