VectorQuery Class
- java.
lang. Object - com.
azure. search. documents. models. VectorQuery
- com.
Implements
public class VectorQuery
implements JsonSerializable<VectorQuery>
The query parameters for vector and hybrid search queries.
Constructor Summary
Constructor | Description |
---|---|
VectorQuery() |
Creates an instance of Vector |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Vector |
fromJson(JsonReader jsonReader)
Reads an instance of Vector |
String |
getFields()
Get the fields property: Vector Fields of type Collection(Edm. |
Integer |
getKNearestNeighborsCount()
Get the k |
Boolean |
isExhaustive()
Get the exhaustive property: When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. |
Vector |
setExhaustive(Boolean exhaustive)
Set the exhaustive property: When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. |
Vector |
setFields(String[] fields)
Set the fields property: Vector Fields of type Collection(Edm. |
Vector |
setKNearestNeighborsCount(Integer kNearestNeighborsCount)
Set the k |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
VectorQuery
public VectorQuery()
Creates an instance of VectorQuery class.
Method Details
fromJson
public static VectorQuery fromJson(JsonReader jsonReader)
Reads an instance of VectorQuery from the JsonReader.
Parameters:
Returns:
Throws:
getFields
public String getFields()
Get the fields property: Vector Fields of type Collection(Edm.Single) to be included in the vector searched.
Returns:
getKNearestNeighborsCount
public Integer getKNearestNeighborsCount()
Get the kNearestNeighborsCount property: Number of nearest neighbors to return as top hits.
Returns:
isExhaustive
public Boolean isExhaustive()
Get the exhaustive property: When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values.
Returns:
setExhaustive
public VectorQuery setExhaustive(Boolean exhaustive)
Set the exhaustive property: When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values.
Parameters:
Returns:
setFields
public VectorQuery setFields(String[] fields)
Set the fields property: Vector Fields of type Collection(Edm.Single) to be included in the vector searched.
Parameters:
Returns:
setKNearestNeighborsCount
public VectorQuery setKNearestNeighborsCount(Integer kNearestNeighborsCount)
Set the kNearestNeighborsCount property: Number of nearest neighbors to return as top hits.
Parameters:
Returns:
toJson
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für