From my understanding ES 2.X do not have separation between queries and filters anymore.
So what kind of construct do I have to use if I want do migrate a filter from 1.X to a query in 2.X?
If I want only the result (a direct answer) regardless of the score what kind of constructs do I have to use (possibly in Java API)?
Lookup the query alternative for your filter (most filters have the same settings and name as their query alternative. For example range filter -> range query ) and wrap it in a bool query's filter clause.
Yes, the filter method makes queries non scoring. In your example the must clause with the match all query is not needed. Your query will be more performant if you remove this must clause.
Thank you very much for the answer.
I've another little doubt.
If do I have to perform a "not" query?
I saw from  that not filter and not query have been replaced by boolean must_not. But isn't must_not bool query scoring? If I want a "non-scoring" bool must_not?
for example: QueryBuilders.boolQuery().filter( query ).mustNot( QueryBuilders.existsQuery( "alias" ) );
Does mustNot contribute to scoring? I guess no, but want only to be sure.