Will query in filter context be rewritten to scroll/scan way?

let's say I did a term query in filter context, curretly dose ES have the ability to rewrite it to scroll/scan or query and fetch way?

Hello, can you elaborate a bit more? Sorry but I don't really get your question.

Thanks
Luca

when we do a search with query-then-fetch type, the actually way is get top docs on each shard and return hits to coordinator, the coordinator then merge and sort the results and drop the resut, then fetch the results.
my question is this: if I construct a boolean filter(let's assume we use 1.7, actually the same thing with higher version), which acutally do not require sort way, then dose ES have the ability to rewrite this query to scroll/scan search type and don't do query-then-fetch mode but iterator throug shards?

I am not sure what you mean by:

The default sort if you don't specify any is by score, if that's what you meant. A normal search cannot become scroll/scan internally then. With recent changes made for 5.0 though, scan search type goes away and the same is achieved through sorting by _doc.

Hope this helps