Interface that defines a filter for querying data from Weaviate. It includes a distance and a WhereFilter.

interface WeaviateFilter {
    where: {
        operands?: ({ operands?: ...[] | undefined; operator?: "And" | "Or" | "Equal" | "Like" | "NotEqual" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual" | "WithinGeoRange" | "IsNull" | "ContainsAny" | "ContainsAll" | undefined; ... 13 more ...; valueGeoRange?: { ...; } | undefined; })[];
        operator?:
            | "And"
            | "Or"
            | "Equal"
            | "Like"
            | "NotEqual"
            | "GreaterThan"
            | "GreaterThanEqual"
            | "LessThan"
            | "LessThanEqual"
            | "WithinGeoRange"
            | "IsNull"
            | "ContainsAny"
            | "ContainsAll";
        path?: string[];
        valueBoolean?: boolean;
        valueBooleanArray?: boolean[];
        valueDate?: string;
        valueDateArray?: string[];
        valueGeoRange?: {
            distance?: {
                max?: number;
            };
            geoCoordinates?: {
                latitude?: number;
                longitude?: number;
            };
        };
        valueInt?: number;
        valueIntArray?: number[];
        valueNumber?: number;
        valueNumberArray?: number[];
        valueString?: string;
        valueStringArray?: string[];
        valueText?: string;
        valueTextArray?: string[];
    };
    distance?: number;
}

Properties

Properties

where: {
    operands?: ({ operands?: ...[] | undefined; operator?: "And" | "Or" | "Equal" | "Like" | "NotEqual" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual" | "WithinGeoRange" | "IsNull" | "ContainsAny" | "ContainsAll" | undefined; ... 13 more ...; valueGeoRange?: { ...; } | undefined; })[];
    operator?:
        | "And"
        | "Or"
        | "Equal"
        | "Like"
        | "NotEqual"
        | "GreaterThan"
        | "GreaterThanEqual"
        | "LessThan"
        | "LessThanEqual"
        | "WithinGeoRange"
        | "IsNull"
        | "ContainsAny"
        | "ContainsAll";
    path?: string[];
    valueBoolean?: boolean;
    valueBooleanArray?: boolean[];
    valueDate?: string;
    valueDateArray?: string[];
    valueGeoRange?: {
        distance?: {
            max?: number;
        };
        geoCoordinates?: {
            latitude?: number;
            longitude?: number;
        };
    };
    valueInt?: number;
    valueIntArray?: number[];
    valueNumber?: number;
    valueNumberArray?: number[];
    valueString?: string;
    valueStringArray?: string[];
    valueText?: string;
    valueTextArray?: string[];
}

Type declaration

  • Optionaloperands?: ({ operands?: ...[] | undefined; operator?: "And" | "Or" | "Equal" | "Like" | "NotEqual" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual" | "WithinGeoRange" | "IsNull" | "ContainsAny" | "ContainsAll" | undefined; ... 13 more ...; valueGeoRange?: { ...; } | undefined; })[]

    combine multiple where filters, requires 'And' or 'Or' operator

  • Optionaloperator?:
        | "And"
        | "Or"
        | "Equal"
        | "Like"
        | "NotEqual"
        | "GreaterThan"
        | "GreaterThanEqual"
        | "LessThan"
        | "LessThanEqual"
        | "WithinGeoRange"
        | "IsNull"
        | "ContainsAny"
        | "ContainsAll"

    operator to use

    GreaterThanEqual
    @enum {string}
  • Optionalpath?: string[]

    path to the property currently being filtered

    [
    "inCity",
    "City",
    "name"
    ]
  • OptionalvalueBoolean?: boolean

    value as boolean

    false
    
  • OptionalvalueBooleanArray?: boolean[]

    value as boolean

    [
    true,
    false
    ]
  • OptionalvalueDate?: string

    value as date (as string)

    TODO
    
  • OptionalvalueDateArray?: string[]

    value as date (as string)

    TODO
    
  • OptionalvalueGeoRange?: {
        distance?: {
            max?: number;
        };
        geoCoordinates?: {
            latitude?: number;
            longitude?: number;
        };
    }

    value as geo coordinates and distance

    • Optionaldistance?: {
          max?: number;
      }
      • Optionalmax?: number

        Format: float64

    • OptionalgeoCoordinates?: {
          latitude?: number;
          longitude?: number;
      }
      • Optionallatitude?: number

        Format: float

        The latitude of the point on earth in decimal form

      • Optionallongitude?: number

        Format: float

        The longitude of the point on earth in decimal form

  • OptionalvalueInt?: number

    Format: int64

    value as integer

    2000
    
  • OptionalvalueIntArray?: number[]

    value as integer

    [100, 200]
    
  • OptionalvalueNumber?: number

    Format: float64

    value as number/float

    3.14
    
  • OptionalvalueNumberArray?: number[]

    value as number/float

    [
    3.14
    ]
  • OptionalvalueString?: string

    value as text (deprecated as of v1.19; alias for valueText)

    my search term
    
  • OptionalvalueStringArray?: string[]

    value as text (deprecated as of v1.19; alias for valueText)

    [
    "my search term"
    ]
  • OptionalvalueText?: string

    value as text

    my search term
    
  • OptionalvalueTextArray?: string[]

    value as text

    [
    "my search term"
    ]
distance?: number