Language

SearchSpec.Builder.SetResultGrouping(Int32, Int32) Method

Definition

Sets the maximum number of results to return for each group, where groups are defined by grouping type.

[Android.Runtime.Register("setResultGrouping", "(II)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.SearchSpec.Builder SetResultGrouping(int groupingTypeFlags, int limit);
[<Android.Runtime.Register("setResultGrouping", "(II)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=31)>]
member this.SetResultGrouping : int * int -> Android.App.AppSearch.SearchSpec.Builder

Parameters

groupingTypeFlags
Int32

One or more combination of grouping types. Value is either 0 or a combination of the following: SearchSpec.GROUPING_TYPE_PER_PACKAGE SearchSpec.GROUPING_TYPE_PER_NAMESPACE SearchSpec.GROUPING_TYPE_PER_SCHEMA

limit
Int32

Number of results to return per groupingTypeFlags.

Returns

Attributes

Remarks

Sets the maximum number of results to return for each group, where groups are defined by grouping type. Calling this method will override any previous calls. So calling setResultGrouping(GROUPING_TYPE_PER_PACKAGE, 7) and then calling setResultGrouping(GROUPING_TYPE_PER_PACKAGE, 2) will result in only the latter, a limit of two results per package, being applied. Or calling setResultGrouping (GROUPING_TYPE_PER_PACKAGE, 1) and then calling setResultGrouping (GROUPING_TYPE_PER_PACKAGE | GROUPING_PER_NAMESPACE, 5) will result in five results per package per namespace.

Android reference for android.app.appsearch.SearchSpec.Builder.setResultGrouping.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to