Replacement for setTypes(list of types) in 7.8 version - can we pass multiple indices to SearchRequest

In 5.5.2 version we had a search query as shown below which uses settypes array(basically list of types).
SearchRequestBuilder searchBuilder = client.prepareSearch(index).setTypes((String) types.toArray(new String[types.size()])).setFrom(startIndex).setSize(size);
In 7.8 we are planning to move to typeless. What should I replace setTypes array with. We are replacing each type with an index now. So, Should I loop the search request object inside the list of indices. Can we pass multiple indices to Searchrequest like how we pass multiple types. Please let me know how shld I proceed in this case

Ok found that SearchRequest takes multiple indices trying that right now.

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