Class ConditionFactory

java.lang.Object
io.qdrant.client.ConditionFactory

public final class ConditionFactory extends Object
Convenience methods for constructing Points.Condition
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.qdrant.client.grpc.Points.Condition
    datetimeRange(String field, io.qdrant.client.grpc.Points.DatetimeRange datetimeRange)
    Matches records where the given field has a datetime value within the specified range
    static io.qdrant.client.grpc.Points.Condition
    filter(io.qdrant.client.grpc.Points.Filter filter)
    Nests a filter
    static io.qdrant.client.grpc.Points.Condition
    geoBoundingBox(String field, double topLeftLatitude, double topLeftLongitude, double bottomRightLatitude, double bottomRightLongitude)
    Match records where the given field has values inside a bounding box specified by the top left and bottom right coordinates.
    static io.qdrant.client.grpc.Points.Condition
    geoPolygon(String field, io.qdrant.client.grpc.Points.GeoLineString exterior, List<io.qdrant.client.grpc.Points.GeoLineString> interiors)
    Matches records where the given field has values inside the provided polygon.
    static io.qdrant.client.grpc.Points.Condition
    geoRadius(String field, double latitude, double longitude, float radius)
    Match records where the given field has values inside a circle centred at a given latitude and longitude with a given radius.
    static io.qdrant.client.grpc.Points.Condition
    hasId(io.qdrant.client.grpc.Points.PointId id)
    Match all records with the provided id
    static io.qdrant.client.grpc.Points.Condition
    hasId(List<io.qdrant.client.grpc.Points.PointId> ids)
    Match all records with the provided ids
    static io.qdrant.client.grpc.Points.Condition
    isEmpty(String field)
    Match all records where the given field either does not exist, or has null or empty value.
    static io.qdrant.client.grpc.Points.Condition
    isNull(String field)
    Match all records where the given field is null.
    static io.qdrant.client.grpc.Points.Condition
    match(String field, boolean value)
    Match records where the given field matches the given boolean value.
    static io.qdrant.client.grpc.Points.Condition
    match(String field, long value)
    Match records where the given field matches the given long value.
    static io.qdrant.client.grpc.Points.Condition
    Match records where the given field does not match any of the given keywords.
    static io.qdrant.client.grpc.Points.Condition
    matchExceptValues(String field, List<Long> values)
    Match records where the given field does not match any of the given values.
    static io.qdrant.client.grpc.Points.Condition
    matchKeyword(String field, String keyword)
    Match records where the given field matches the given keyword
    static io.qdrant.client.grpc.Points.Condition
    matchKeywords(String field, List<String> keywords)
    Match records where the given field matches any of the given keywords.
    static io.qdrant.client.grpc.Points.Condition
    matchText(String field, String text)
    Match records where the given field matches the given text.
    static io.qdrant.client.grpc.Points.Condition
    matchValues(String field, List<Long> values)
    Match records where the given field matches any of the given values.
    static io.qdrant.client.grpc.Points.Condition
    nested(String field, io.qdrant.client.grpc.Points.Condition condition)
    Match records where the given nested field matches the given condition.
    static io.qdrant.client.grpc.Points.Condition
    nested(String field, io.qdrant.client.grpc.Points.Filter filter)
    Match records where the given nested field matches the given filter.
    static io.qdrant.client.grpc.Points.Condition
    range(String field, io.qdrant.client.grpc.Points.Range range)
    Match records where the given field matches the given range.
    static io.qdrant.client.grpc.Points.Condition
    valuesCount(String field, io.qdrant.client.grpc.Points.ValuesCount valuesCount)
    Matches records where the given field has a count of values within the specified count range

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • hasId

      public static io.qdrant.client.grpc.Points.Condition hasId(io.qdrant.client.grpc.Points.PointId id)
      Match all records with the provided id
      Parameters:
      id - The id to match
      Returns:
      a new instance of Points.Condition
    • hasId

      public static io.qdrant.client.grpc.Points.Condition hasId(List<io.qdrant.client.grpc.Points.PointId> ids)
      Match all records with the provided ids
      Parameters:
      ids - The ids to match
      Returns:
      a new instance of Points.Condition
    • isEmpty

      public static io.qdrant.client.grpc.Points.Condition isEmpty(String field)
      Match all records where the given field either does not exist, or has null or empty value.
      Parameters:
      field - The name of the field
      Returns:
      a new instance of Points.Condition
    • isNull

      public static io.qdrant.client.grpc.Points.Condition isNull(String field)
      Match all records where the given field is null.
      Parameters:
      field - The name of the field
      Returns:
      a new instance of Points.Condition
    • matchKeyword

      public static io.qdrant.client.grpc.Points.Condition matchKeyword(String field, String keyword)
      Match records where the given field matches the given keyword
      Parameters:
      field - The name of the field
      keyword - The keyword to match
      Returns:
      a new instance of Points.Condition
    • matchText

      public static io.qdrant.client.grpc.Points.Condition matchText(String field, String text)
      Match records where the given field matches the given text.
      Parameters:
      field - The name of the field
      text - The text to match
      Returns:
      a new instance of Points.Condition
    • match

      public static io.qdrant.client.grpc.Points.Condition match(String field, boolean value)
      Match records where the given field matches the given boolean value.
      Parameters:
      field - The name of the field
      value - The value to match
      Returns:
      a new instance of Points.Condition
    • match

      public static io.qdrant.client.grpc.Points.Condition match(String field, long value)
      Match records where the given field matches the given long value.
      Parameters:
      field - The name of the field
      value - The value to match
      Returns:
      a new instance of Points.Condition
    • matchKeywords

      public static io.qdrant.client.grpc.Points.Condition matchKeywords(String field, List<String> keywords)
      Match records where the given field matches any of the given keywords.
      Parameters:
      field - The name of the field
      keywords - The keywords to match
      Returns:
      a new instance of Points.Condition
    • matchValues

      public static io.qdrant.client.grpc.Points.Condition matchValues(String field, List<Long> values)
      Match records where the given field matches any of the given values.
      Parameters:
      field - The name of the field
      values - The values to match
      Returns:
      a new instance of Points.Condition
    • matchExceptKeywords

      public static io.qdrant.client.grpc.Points.Condition matchExceptKeywords(String field, List<String> keywords)
      Match records where the given field does not match any of the given keywords.
      Parameters:
      field - The name of the field
      keywords - The keywords not to match
      Returns:
      a new instance of Points.Condition
    • matchExceptValues

      public static io.qdrant.client.grpc.Points.Condition matchExceptValues(String field, List<Long> values)
      Match records where the given field does not match any of the given values.
      Parameters:
      field - The name of the field
      values - The values not to match
      Returns:
      a new instance of Points.Condition
    • nested

      public static io.qdrant.client.grpc.Points.Condition nested(String field, io.qdrant.client.grpc.Points.Condition condition)
      Match records where the given nested field matches the given condition.
      Parameters:
      field - The name of the nested field.
      condition - The condition to match.
      Returns:
      a new instance of Points.Condition
    • nested

      public static io.qdrant.client.grpc.Points.Condition nested(String field, io.qdrant.client.grpc.Points.Filter filter)
      Match records where the given nested field matches the given filter.
      Parameters:
      field - The name of the nested field.
      filter - The filter to match.
      Returns:
      a new instance of Points.Condition
    • range

      public static io.qdrant.client.grpc.Points.Condition range(String field, io.qdrant.client.grpc.Points.Range range)
      Match records where the given field matches the given range.
      Parameters:
      field - The name of the nested field.
      range - The range to match.
      Returns:
      a new instance of Points.Condition
    • geoRadius

      public static io.qdrant.client.grpc.Points.Condition geoRadius(String field, double latitude, double longitude, float radius)
      Match records where the given field has values inside a circle centred at a given latitude and longitude with a given radius.
      Parameters:
      field - The name of the field.
      latitude - The latitude of the center.
      longitude - The longitude of the center.
      radius - The radius in meters.
      Returns:
      a new instance of Points.Condition
    • geoBoundingBox

      public static io.qdrant.client.grpc.Points.Condition geoBoundingBox(String field, double topLeftLatitude, double topLeftLongitude, double bottomRightLatitude, double bottomRightLongitude)
      Match records where the given field has values inside a bounding box specified by the top left and bottom right coordinates.
      Parameters:
      field - The name of the field.
      topLeftLatitude - The latitude of the top left point.
      topLeftLongitude - The longitude of the top left point.
      bottomRightLatitude - The latitude of the bottom right point.
      bottomRightLongitude - The longitude of the bottom right point.
      Returns:
      a new instance of Points.Condition
    • geoPolygon

      public static io.qdrant.client.grpc.Points.Condition geoPolygon(String field, io.qdrant.client.grpc.Points.GeoLineString exterior, List<io.qdrant.client.grpc.Points.GeoLineString> interiors)
      Matches records where the given field has values inside the provided polygon. A polygon always has an exterior ring and may optionally have interior rings, which represent independent areas or holes. When defining a ring, you must pick either a clockwise or counterclockwise ordering for your points. The first and last point of the polygon must be the same.
      Parameters:
      field - The name of the field.
      exterior - The exterior ring of the polygon.
      interiors - The interior rings of the polygon.
      Returns:
      a new instance of Points.Condition
    • valuesCount

      public static io.qdrant.client.grpc.Points.Condition valuesCount(String field, io.qdrant.client.grpc.Points.ValuesCount valuesCount)
      Matches records where the given field has a count of values within the specified count range
      Parameters:
      field - The name of the field.
      valuesCount - The count range to match.
      Returns:
      a new instance of Points.Condition
    • filter

      public static io.qdrant.client.grpc.Points.Condition filter(io.qdrant.client.grpc.Points.Filter filter)
      Nests a filter
      Parameters:
      filter - The filter to nest.
      Returns:
      a new instance of Points.Condition
    • datetimeRange

      public static io.qdrant.client.grpc.Points.Condition datetimeRange(String field, io.qdrant.client.grpc.Points.DatetimeRange datetimeRange)
      Matches records where the given field has a datetime value within the specified range
      Parameters:
      field - The name of the field.
      datetimeRange - The datetime range to match.
      Returns:
      a new instance of Points.Condition