Language

SearchSpec.Builder.SetMaxSnippetSize(Int32) メソッド

定義

スニペットの最大サイズである maxSnippetSize を設定します。

[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

パラメーター

maxSnippetSize
Int32

値は 0 から ERROR(/android.app.appsearch.SearchSpec#MAX_SNIPPET_SIZE_LIMIT) の範囲です

返品

属性

注釈

スニペットの最大サイズである maxSnippetSize を設定します。 スニペット ウィンドウは、一致するトークンの中央の前の maxSnippetSize/2 バイトから始まり、一致するトークンの中央から maxSnippetSize/2 バイトで終わる。 トークンの境界が考慮されるため、返されるウィンドウは要求されたウィンドウよりも小さい場合があります。 maxSnippetSize を 0 に設定すると、ウィンドウが無効になり、空の文字列が返されます。 一致も false に設定されている場合、スニペットは無効になります。 たとえば、maxSnippetSize = 16 です。 クエリが "baz" の "foo bar baz bat rat" は、長さ 11 バイトの "bar baz bat" のウィンドウを返します。

android.app.appsearch.SearchSpec.Builder.setMaxSnippetSizeの Android リファレンス。

このページの一部は、Androidオープンソースプロジェクトによって作成および共有された作業に基づく変更でありCreative Commons 2.5属性ライセンスに記載されている条件に従って使用されます。

適用対象