Ensuring results from multiple indexes

I have a number of indexes and want to search across all of them but ensure I get results from all the indexes. Is this possible?

So say I have two indexes, "clients" and "colleagues" and I do a search across both of them, is there a way of specifying that I want to get a maximum of 5 results from each index, resulting in a total of up to 10 results returned?

Basically I'm building a spotlight alike quick search box which matches as the user types.
Currently it's a bit weird because if I ask for a maximum of 10 results, all of them could come from the same type when instead I want to display at least one match (if there is one) for each type.

I can get round this by searching each type individually, but obviously it would be a lot faster to be able to do it in one query.

Cheers.

Heya,

No, there isn't an option to specify that, so you will need to execute the search several times. It can be enabled as a feature for search, but, I think a proper way to solve it is to have bulk search support which will allow for other usecases.

-shay.banon
On Friday, April 8, 2011 at 4:12 PM, Richard Livsey wrote:

I have a number of indexes and want to search across all of them but ensure I get results from all the indexes. Is this possible?

So say I have two indexes, "clients" and "colleagues" and I do a search across both of them, is there a way of specifying that I want to get a maximum of 5 results from each index, resulting in a total of up to 10 results returned?

Basically I'm building a spotlight alike quick search box which matches as the user types.
Currently it's a bit weird because if I ask for a maximum of 10 results, all of them could come from the same type when instead I want to display at least one match (if there is one) for each type.

I can get round this by searching each type individually, but obviously it would be a lot faster to be able to do it in one query.

Cheers.

No problem, I've got it working by issuing separate queries and combining the results and it's pretty quick for now.

Cheers.

On Friday, 8 April 2011 at 19:25, Shay Banon wrote:

Heya,

No, there isn't an option to specify that, so you will need to execute the search several times. It can be enabled as a feature for search, but, I think a proper way to solve it is to have bulk search support which will allow for other usecases.

-shay.banon
On Friday, April 8, 2011 at 4:12 PM, Richard Livsey wrote:

I have a number of indexes and want to search across all of them but ensure I get results from all the indexes. Is this possible?

So say I have two indexes, "clients" and "colleagues" and I do a search across both of them, is there a way of specifying that I want to get a maximum of 5 results from each index, resulting in a total of up to 10 results returned?

Basically I'm building a spotlight alike quick search box which matches as the user types.
Currently it's a bit weird because if I ask for a maximum of 10 results, all of them could come from the same type when instead I want to display at least one match (if there is one) for each type.

I can get round this by searching each type individually, but obviously it would be a lot faster to be able to do it in one query.

Cheers.