Class DistanceScoringParameters
java.lang.Object
com.azure.search.documents.indexes.models.DistanceScoringParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DistanceScoringParameters>
public final class DistanceScoringParameters
extends Object
implements com.azure.json.JsonSerializable<DistanceScoringParameters>
Provides parameter values to a distance scoring function.
-
Constructor Summary
ConstructorsConstructorDescriptionDistanceScoringParameters(String referencePointParameter, double boostingDistance) Creates an instance of DistanceScoringParameters class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DistanceScoringParametersfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DistanceScoringParameters from the JsonReader.doubleGet the boostingDistance property: The distance in kilometers from the reference location where the boosting range ends.Get the referencePointParameter property: The name of the parameter passed in search queries to specify the reference location.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DistanceScoringParameters
Creates an instance of DistanceScoringParameters class.- Parameters:
referencePointParameter- the referencePointParameter value to set.boostingDistance- the boostingDistance value to set.
-
-
Method Details
-
getReferencePointParameter
Get the referencePointParameter property: The name of the parameter passed in search queries to specify the reference location.- Returns:
- the referencePointParameter value.
-
getBoostingDistance
public double getBoostingDistance()Get the boostingDistance property: The distance in kilometers from the reference location where the boosting range ends.- Returns:
- the boostingDistance value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DistanceScoringParameters>- Throws:
IOException
-
fromJson
public static DistanceScoringParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DistanceScoringParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DistanceScoringParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the DistanceScoringParameters.
-