Prefer the @langchain/weaviate package.

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

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

Properties

Properties

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

Type declaration

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

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

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

    operator to use

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

    path to the property currently being filtered

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

    value as boolean

    false
    
  • OptionalvalueDate?: 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
    
  • OptionalvalueNumber?: number

    Format: float64

    value as number/float

    3.14
    
  • OptionalvalueString?: string

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

    my search term
    
  • OptionalvalueText?: string

    value as text

    my search term