SearchSpec.Builder.SetMaxSnippetSize(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. For example, maxSnippetSize = 16. "foo bar baz bat rat" with a query of "baz" will return a window of "bar baz bat", which is 11 characters long.
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.