Delen via


ScoringProfile Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.ScoringProfile

Implements

public final class ScoringProfile
implements JsonSerializable<ScoringProfile>

Defines parameters for a search index that influence scoring in search queries.

Constructor Summary

Constructor Description
ScoringProfile(String name)

Creates an instance of ScoringProfile class.

Method Summary

Modifier and Type Method and Description
static ScoringProfile fromJson(JsonReader jsonReader)

Reads an instance of ScoringProfile from the JsonReader.

ScoringFunctionAggregation getFunctionAggregation()

Get the functionAggregation property: A value indicating how the results of individual scoring functions should be combined.

List<ScoringFunction> getFunctions()

Get the functions property: The collection of functions that influence the scoring of documents.

String getName()

Get the name property: The name of the scoring profile.

TextWeights getTextWeights()

Get the textWeights property: Parameters that boost scoring based on text matches in certain index fields.

ScoringProfile setFunctionAggregation(ScoringFunctionAggregation functionAggregation)

Set the functionAggregation property: A value indicating how the results of individual scoring functions should be combined.

ScoringProfile setFunctions(ScoringFunction[] functions)

Set the functions property: The collection of functions that influence the scoring of documents.

ScoringProfile setFunctions(List<ScoringFunction> functions)

Set the functions property: The collection of functions that influence the scoring of documents.

ScoringProfile setTextWeights(TextWeights textWeights)

Set the textWeights property: Parameters that boost scoring based on text matches in certain index fields.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ScoringProfile

public ScoringProfile(String name)

Creates an instance of ScoringProfile class.

Parameters:

name - the name value to set.

Method Details

fromJson

public static ScoringProfile fromJson(JsonReader jsonReader)

Reads an instance of ScoringProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ScoringProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getFunctionAggregation

public ScoringFunctionAggregation getFunctionAggregation()

Get the functionAggregation property: A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions.

Returns:

the functionAggregation value.

getFunctions

public List getFunctions()

Get the functions property: The collection of functions that influence the scoring of documents.

Returns:

the functions value.

getName

public String getName()

Get the name property: The name of the scoring profile.

Returns:

the name value.

getTextWeights

public TextWeights getTextWeights()

Get the textWeights property: Parameters that boost scoring based on text matches in certain index fields.

Returns:

the textWeights value.

setFunctionAggregation

public ScoringProfile setFunctionAggregation(ScoringFunctionAggregation functionAggregation)

Set the functionAggregation property: A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions.

Parameters:

functionAggregation - the functionAggregation value to set.

Returns:

the ScoringProfile object itself.

setFunctions

public ScoringProfile setFunctions(ScoringFunction[] functions)

Set the functions property: The collection of functions that influence the scoring of documents.

Parameters:

functions - the functions value to set.

Returns:

the ScoringProfile object itself.

setFunctions

public ScoringProfile setFunctions(List functions)

Set the functions property: The collection of functions that influence the scoring of documents.

Parameters:

functions - the functions value to set.

Returns:

the ScoringProfile object itself.

setTextWeights

public ScoringProfile setTextWeights(TextWeights textWeights)

Set the textWeights property: Parameters that boost scoring based on text matches in certain index fields.

Parameters:

textWeights - the textWeights value to set.

Returns:

the ScoringProfile object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to