SearchSpec.Builder.SetDefaultEmbeddingSearchMetricType(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 the default embedding metric type used for embedding search (see AppSearchSession.search ) and ranking (see SearchSpec.Builder.setRankingStrategy(String) ).
[Android.Runtime.Register("setDefaultEmbeddingSearchMetricType", "(I)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=36)]
public Android.App.AppSearch.SearchSpec.Builder SetDefaultEmbeddingSearchMetricType(int defaultEmbeddingSearchMetricType);
[<Android.Runtime.Register("setDefaultEmbeddingSearchMetricType", "(I)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=36)>]
member this.SetDefaultEmbeddingSearchMetricType : int -> Android.App.AppSearch.SearchSpec.Builder
Parameters
- defaultEmbeddingSearchMetricType
- Int32
Value is one of the following: SearchSpec.EMBEDDING_SEARCH_METRIC_TYPE_DEFAULT SearchSpec.EMBEDDING_SEARCH_METRIC_TYPE_COSINE SearchSpec.EMBEDDING_SEARCH_METRIC_TYPE_DOT_PRODUCT SearchSpec.EMBEDDING_SEARCH_METRIC_TYPE_EUCLIDEAN
Returns
- Attributes
Remarks
Sets the default embedding metric type used for embedding search (see AppSearchSession.search ) and ranking (see SearchSpec.Builder.setRankingStrategy(String) ). If this method is not called, the default embedding search metric type is SearchSpec.EMBEDDING_SEARCH_METRIC_TYPE_COSINE. Metrics specified within "semanticSearch" or "matchedSemanticScores" functions in search/ranking expressions will override this default.
Android reference for android.app.appsearch.SearchSpec.Builder.setDefaultEmbeddingSearchMetricType.
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.