VectorizableImageBinaryQuery Class

public final class VectorizableImageBinaryQuery
extends VectorQuery

The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided.

Constructor Summary

Constructor Description
VectorizableImageBinaryQuery()

Creates an instance of VectorizableImageBinaryQuery class.

Method Summary

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

Reads an instance of VectorizableImageBinaryQuery from the JsonReader.

String getBase64Image()

Get the base64Image property: The base 64 encoded binary of an image to be vectorized to perform a vector search query.

VectorQueryKind getKind()

Get the kind property: Type of query.

VectorizableImageBinaryQuery setBase64Image(String base64Image)

Set the base64Image property: The base 64 encoded binary of an image to be vectorized to perform a vector search query.

VectorizableImageBinaryQuery setExhaustive(Boolean exhaustive)

Set the exhaustive property: When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index.

VectorizableImageBinaryQuery setFields(String fields)

Set the fields property: Vector Fields of type Collection(Edm.Single) to be included in the vector searched.

VectorizableImageBinaryQuery setKNearestNeighbors(Integer kNearestNeighbors)

Set the kNearestNeighbors property: Number of nearest neighbors to return as top hits.

VectorizableImageBinaryQuery setOversampling(Double oversampling)

Set the oversampling property: Oversampling factor.

VectorizableImageBinaryQuery setWeight(Float weight)

Set the weight property: Relative weight of the vector query when compared to other vector query and/or the text query within the same search request.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from VectorQuery

Methods inherited from java.lang.Object

Constructor Details

VectorizableImageBinaryQuery

public VectorizableImageBinaryQuery()

Creates an instance of VectorizableImageBinaryQuery class.

Method Details

fromJson

public static VectorizableImageBinaryQuery fromJson(JsonReader jsonReader)

Reads an instance of VectorizableImageBinaryQuery from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the VectorizableImageBinaryQuery.

getBase64Image

public String getBase64Image()

Get the base64Image property: The base 64 encoded binary of an image to be vectorized to perform a vector search query.

Returns:

the base64Image value.

getKind

public VectorQueryKind getKind()

Get the kind property: Type of query.

Overrides:

VectorizableImageBinaryQuery.getKind()

Returns:

the kind value.

setBase64Image

public VectorizableImageBinaryQuery setBase64Image(String base64Image)

Set the base64Image property: The base 64 encoded binary of an image to be vectorized to perform a vector search query.

Parameters:

base64Image - the base64Image value to set.

Returns:

the VectorizableImageBinaryQuery object itself.

setExhaustive

public VectorizableImageBinaryQuery 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.

Overrides:

VectorizableImageBinaryQuery.setExhaustive(Boolean exhaustive)

Parameters:

exhaustive

setFields

public VectorizableImageBinaryQuery setFields(String fields)

Set the fields property: Vector Fields of type Collection(Edm.Single) to be included in the vector searched.

Overrides:

VectorizableImageBinaryQuery.setFields(String fields)

Parameters:

fields

setKNearestNeighbors

public VectorizableImageBinaryQuery setKNearestNeighbors(Integer kNearestNeighbors)

Set the kNearestNeighbors property: Number of nearest neighbors to return as top hits.

Overrides:

VectorizableImageBinaryQuery.setKNearestNeighbors(Integer kNearestNeighbors)

Parameters:

kNearestNeighbors

setOversampling

public VectorizableImageBinaryQuery setOversampling(Double oversampling)

Set the oversampling property: Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field.

Overrides:

VectorizableImageBinaryQuery.setOversampling(Double oversampling)

Parameters:

oversampling

setWeight

public VectorizableImageBinaryQuery setWeight(Float weight)

Set the weight property: Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero.

Overrides:

VectorizableImageBinaryQuery.setWeight(Float weight)

Parameters:

weight

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

VectorizableImageBinaryQuery.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to