Package io.qdrant.client.utils
Class PointUtil
java.lang.Object
io.qdrant.client.utils.PointUtil
Utility class for working with Points.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Points.ReadConsistency
consistency
(Points.ReadConsistencyType consistencyType) Creates aPoints.ReadConsistency
with the specified consistency type.static Points.PointsSelector
createPointsSelector
(long... pointIds) Creates aPoints.PointsSelector
with point IDs specified as long values.static Points.PointsSelector
createPointsSelector
(Iterable<? extends Points.PointId> pointIds) Creates aPoints.PointsSelector
with point IDs specified as an iterable ofPoints.PointId
.static Points.PointsSelector
createPointsSelector
(String... pointIds) Creates aPoints.PointsSelector
with point IDs specified as strings.static Points.PointStruct
namedPoint
(Points.PointId id, String vectorName, float[] vectorData, Map<String, JsonWithInt.Value> payload) Creates a namedPoints.PointStruct
with aPoints.PointId
, vector name, vector data, and payload data.static Points.PointStruct
namedPoint
(Long id, String vectorName, float[] vectorData, Map<String, JsonWithInt.Value> payload) Creates a namedPoints.PointStruct
with a long ID, vector name, vector data, and payload data.static Points.WriteOrdering
ordering
(Points.WriteOrderingType orderingType) Creates aPoints.WriteOrdering
with the specified ordering type.static Points.PointStruct
point
(long id, Points.Vector vector, Map<String, JsonWithInt.Value> payload) Creates aPoints.PointStruct
with a long ID, aPoints.Vector
, and payload data.static Points.PointStruct
point
(Points.PointId id, Points.Vector vector, Map<String, JsonWithInt.Value> payload) static Points.PointStruct
point
(String uuid, Points.Vector vector, Map<String, JsonWithInt.Value> payload) Creates aPoints.PointStruct
with a UUID string, aPoints.Vector
, and payload data.static Points.PointStruct
point
(UUID uuid, Points.Vector vector, Map<String, JsonWithInt.Value> payload) Creates aPoints.PointStruct
with a UUID, aPoints.Vector
, and payload data.static Points.PointId
pointId
(long num) Creates aPoints.PointId
with a long value.static Points.PointId
Creates aPoints.PointId
with a string representing a UUID.static Points.PointId
Creates aPoints.PointId
with aUUID
.static Points.PointsSelector
pointsSelector
(Points.Filter filter) Creates aPoints.PointsSelector
with a filter condition.
-
Constructor Details
-
PointUtil
public PointUtil()
-
-
Method Details
-
createPointsSelector
Creates aPoints.PointsSelector
with point IDs specified as long values.- Parameters:
pointIds
- The array of point IDs.- Returns:
- The created PointsSelector.
-
createPointsSelector
Creates aPoints.PointsSelector
with point IDs specified as strings.- Parameters:
pointIds
- The array of point IDs.- Returns:
- The created PointsSelector.
-
createPointsSelector
public static Points.PointsSelector createPointsSelector(Iterable<? extends Points.PointId> pointIds) Creates aPoints.PointsSelector
with point IDs specified as an iterable ofPoints.PointId
.- Parameters:
pointIds
- The iterable of point IDs.- Returns:
- The created PointsSelector.
-
pointsSelector
Creates aPoints.PointsSelector
with a filter condition.- Parameters:
filter
- The filter condition.- Returns:
- The created PointsSelector.
-
pointId
Creates aPoints.PointId
with a long value.- Parameters:
num
- The long value for the point ID.- Returns:
- The created PointId.
- Throws:
IllegalArgumentException
- if the provided long value is negative.
-
pointId
Creates aPoints.PointId
with a string representing a UUID.- Parameters:
uuid
- The string representation of the UUID.- Returns:
- The created PointId.
- Throws:
IllegalArgumentException
- if the provided string is not a valid UUID.
-
pointId
Creates aPoints.PointId
with aUUID
.- Parameters:
uuid
- The UUID.- Returns:
- The created PointId.
-
point
public static Points.PointStruct point(UUID uuid, Points.Vector vector, Map<String, JsonWithInt.Value> payload) Creates aPoints.PointStruct
with a UUID, aPoints.Vector
, and payload data.- Parameters:
uuid
- The UUID.vector
- The vector data.payload
- The payload data.- Returns:
- The created PointStruct.
-
point
public static Points.PointStruct point(long id, Points.Vector vector, Map<String, JsonWithInt.Value> payload) Creates aPoints.PointStruct
with a long ID, aPoints.Vector
, and payload data.- Parameters:
id
- The long ID.vector
- The vector data.payload
- The payload data.- Returns:
- The created PointStruct.
-
point
public static Points.PointStruct point(String uuid, Points.Vector vector, Map<String, JsonWithInt.Value> payload) Creates aPoints.PointStruct
with a UUID string, aPoints.Vector
, and payload data.- Parameters:
uuid
- The UUID string.vector
- The vector data.payload
- The payload data.- Returns:
- The created PointStruct.
-
point
public static Points.PointStruct point(Points.PointId id, Points.Vector vector, Map<String, JsonWithInt.Value> payload) - Parameters:
id
- The PointId.vector
- The vector data.payload
- The payload data.- Returns:
- The created PointStruct.
-
namedPoint
public static Points.PointStruct namedPoint(Long id, String vectorName, float[] vectorData, Map<String, JsonWithInt.Value> payload) Creates a namedPoints.PointStruct
with a long ID, vector name, vector data, and payload data.- Parameters:
id
- The long ID.vectorName
- The name of the vector.vectorData
- The vector data.payload
- The payload data.- Returns:
- The created PointStruct.
-
namedPoint
public static Points.PointStruct namedPoint(Points.PointId id, String vectorName, float[] vectorData, Map<String, JsonWithInt.Value> payload) Creates a namedPoints.PointStruct
with aPoints.PointId
, vector name, vector data, and payload data.- Parameters:
id
- The PointId.vectorName
- The name of the vector.vectorData
- The vector data.payload
- The payload data.- Returns:
- The created PointStruct.
-
ordering
Creates aPoints.WriteOrdering
with the specified ordering type.- Parameters:
orderingType
- The ordering type.- Returns:
- The created WriteOrdering.
-
consistency
Creates aPoints.ReadConsistency
with the specified consistency type.- Parameters:
consistencyType
- The consistency type.- Returns:
- The created ReadConsistency.
-