Language

SearchSpec.Builder.SetMaxSnippetSize(Int32) Method

Definition

Sets maxSnippetSize, the maximum snippet size.

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

Parameters

maxSnippetSize
Int32

Value is between 0 and 10000 inclusive

Returns

This builder instance.

Attributes

Remarks

Sets maxSnippetSize, the maximum snippet size in Unicode code points. Windowing starts around the middle of the matching token and adjusts to token boundaries, so the returned window may be smaller than requested. Setting maxSnippetSize to 0 will disable windowing and an empty String will be returned.

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

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