FreshnessScoringParameters Class

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

Implements

public final class FreshnessScoringParameters
implements JsonSerializable<FreshnessScoringParameters>

Provides parameter values to a freshness scoring function.

Constructor Summary

Constructor Description
FreshnessScoringParameters(Duration boostingDuration)

Creates an instance of FreshnessScoringParameters class.

Method Summary

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

Reads an instance of FreshnessScoringParameters from the JsonReader.

Duration getBoostingDuration()

Get the boostingDuration property: The expiration period after which boosting will stop for a particular document.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

FreshnessScoringParameters

public FreshnessScoringParameters(Duration boostingDuration)

Creates an instance of FreshnessScoringParameters class.

Parameters:

boostingDuration - the boostingDuration value to set.

Method Details

fromJson

public static FreshnessScoringParameters fromJson(JsonReader jsonReader)

Reads an instance of FreshnessScoringParameters from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FreshnessScoringParameters 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.

getBoostingDuration

public Duration getBoostingDuration()

Get the boostingDuration property: The expiration period after which boosting will stop for a particular document.

Returns:

the boostingDuration value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to

Azure SDK for Java

Latest