Started to migrate our system to ES 6/7 single type and having some troubles i need assistance with.
We have a system which makes use of mustache templates and we query (before migration) a type along with a template and parameters, now when migrating to a single type I've added our previously type into a new field _docType to our documents and now to get this running I must in every template add a term-filter for _docType, and this is the part I don't like. I don't want to remember to add this in each new template that is written and would like to make use of URI-query to always append a filter for _docType ie. /_search/template?q=_docType:SomeType.
Problem with this is that if I have a "query"-clause in my template it's not getting applied, the URI query takes precedence.
Is there any other way to accomplish this?