I am not quire clear how ES calculate TF/IDF in some situations, like cross index/type search, search with filters etc.
Assume I have two indices, index1 and index2, each of which has two types, type1, and type2. All types of all indies have a filed: language which could be used as filter.
Cross index search
In this case, is IDF calculated based on all docs of all indices, (that is, same IDF used for index1 & index2), or calculated separately for index1 and index2 ( that is, different IDF for index1 and index2 )?
Search with filter
In this situation, is IDF calculated based on all docs in type1 of index1, or just based on docs whose language is "english"?