GenericDocument.Builder.SetScore(Int32) Method

Definition

Sets the score of the GenericDocument.

[Android.Runtime.Register("setScore", "(I)Landroid/app/appsearch/GenericDocument$Builder;", "GetSetScore_IHandler", ApiSince=31)]
public virtual Java.Lang.Object SetScore(int score);
[<Android.Runtime.Register("setScore", "(I)Landroid/app/appsearch/GenericDocument$Builder;", "GetSetScore_IHandler", ApiSince=31)>]
abstract member SetScore : int -> Java.Lang.Object
override this.SetScore : int -> Java.Lang.Object

Parameters

score
Int32

any non-negative int representing the document's score. Value is between 0 and Integer.MAX_VALUE inclusive

Returns

Attributes

Remarks

Sets the score of the GenericDocument. The score is a query-independent measure of the document's quality, relative to other GenericDocument objects of the same AppSearchSchema type. Results may be sorted by score using SearchSpec.Builder.setRankingStrategy. Documents with higher scores are considered better than documents with lower scores. Any non-negative integer can be used a score. By default, scores are set to 0.

Android reference for android.app.appsearch.GenericDocument.Builder.setScore.

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