Language

SearchSpec.Builder.SetSnippetCount(Int32) Method

Definition

Sets the snippetCount such that the first snippetCount documents based on the ranking strategy will have snippet information provided.

[Android.Runtime.Register("setSnippetCount", "(I)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.SearchSpec.Builder SetSnippetCount(int snippetCount);
[<Android.Runtime.Register("setSnippetCount", "(I)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=31)>]
member this.SetSnippetCount : int -> Android.App.AppSearch.SearchSpec.Builder

Parameters

snippetCount
Int32

Value is between 0 and ERROR(/android.app.appsearch.SearchSpec#MAX_SNIPPET_COUNT) inclusive

Returns

Attributes

Remarks

Sets the snippetCount such that the first snippetCount documents based on the ranking strategy will have snippet information provided. The list returned from SearchResult.getMatchInfos will contain at most this many entries. If set to 0 (default), snippeting is disabled and the list returned from SearchResult.getMatchInfos will be empty.

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

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