Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to group by a field in Azure Search

I need to query an index with paging and the index contains huge amount of documents. The query should also group by one of the fields. Is it possible to group by a field in Azure Search?

Thanks!

like image 983
doorman Avatar asked Oct 31 '22 09:10

doorman


1 Answers

For the grouping of fields, I would suggest that you leverage the faceting capability that allows you to retrieve the count of values within a field. There are some good examples of how to do faceting here: https://msdn.microsoft.com/en-us/library/azure/dn798927.aspx?f=255&MSPPError=-2147217396

Also, I am not sure if you are asking if it is possible to do paging with Azure Search, but the answer is yes, and you can do so using the $skip and $top parameters. There are also examples of this in the above link.

Liam

like image 161
Liam Cavanagh - MSFT Avatar answered Nov 08 '22 19:11

Liam Cavanagh - MSFT