Can I use routing only for one index in multi index search?

Hi,

I have documents split up into 2 indices. Index1 has a custom routing option(with 24 shards in total) while index2 doesn't(with 8 shards in total). When I make a search request, I want to search both the indices but will provide 4 routing strings that should hit 4 shards in index1 but search all shards of index2 with no routing? So, I want to search 12 shards in total, 4 in index1 with routing and 8 in index2 without routing. I will be using the dfs query then fetch to use global tf ids stats. Can I make a single search request to search these 12 shards and apply routing only to index1? If yes, how do I do it? If not, what are the alternative things I can do to make my use case work?

Thanks.

You'd have to issue two queries, there's no way to do it in one.

@warkolm Even if I use two queries, how would I make sure the scoring is uniform across both? Like having a global tf idf score for both queries?

You just can't do it, you need to pick one or the other process.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.