prorm API Reference
    Preparing search index...

    Class WeaviateStore

    WeaviateStore wraps a weaviate-client (v3) WeaviateClient and exposes Weaviate's collection management, object insert/query/update/delete, and near-vector/near-text similarity search as a typed, promise-based API.

    Implements

    Index
    name: "weaviate" = 'weaviate'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "weaviate-client" = 'weaviate-client'

    The client library being used

    • Build a FilterValue (see nearVector()/fetchObjects()/deleteMany()'s filters option) against a collection's schema, e.g. store.filter('Article').byProperty('title').equal('Hello').

      Parameters

      • collectionName: string

      Returns Filter<unknown>

    • Create a new collection ("class"). properties declares the object schema (name/dataType/indexing per field); vectorizer configures how vectors are produced - pass weaviate.configure.vectorizer.none() for bring-your-own vectors, or a module config like weaviate.configure.vectorizer.text2VecOpenAI() to have Weaviate call out to an embedding provider (which requires the corresponding API key in headers, e.g. X-OpenAI-Api-Key, at connect time).

      Parameters

      Returns Promise<CollectionConfig>

    • Delete a collection and all of its objects.

      Parameters

      • collectionName: string

      Returns Promise<void>

    • List every collection's configuration.

      Returns Promise<CollectionConfig[]>

    • Whether a collection with this name exists.

      Parameters

      • collectionName: string

      Returns Promise<boolean>

    • Detailed schema/config for one collection (properties, vectorizer, replication, etc).

      Parameters

      • collectionName: string

      Returns Promise<CollectionConfig>

    • Insert a single object. object.vector (renamed vectors on the wire) may be omitted entirely for collections with a server-side vectorizer module, or supplied explicitly (a plain array, or a { name: vector } map for named-vector collections) for none/self-provided vectorizers. Returns the object's UUID (generated if object.id wasn't given).

      Parameters

      Returns Promise<string>

    • Find the objects whose vector is closest to the vectorized form of query (a single string, or multiple strings averaged together). Requires the collection to have a text vectorizer module configured (this is not a keyword/BM25 search - use getClient() for that).

      Parameters

      Returns Promise<WeaviateQueryReturn>

    • Partially update an object (PATCH semantics) - only the fields in fields.properties/fields.vectors are changed; everything else on the object is left as-is.

      Parameters

      Returns Promise<void>

    • Fully replace an object (PUT semantics) - any property not present in fields.properties is cleared, unlike updateObject().

      Parameters

      Returns Promise<void>

    • Whether an object with this UUID exists in the collection.

      Parameters

      • collectionName: string
      • id: string

      Returns Promise<boolean>

    • Delete a single object by its UUID. Returns true if an object was actually deleted.

      The real weaviate-client data.deleteById() issues a REST DELETE and resolves true unconditionally (Weaviate's DELETE /objects/{id} returns success whether or not an object with that id existed) - it does not itself report whether anything was deleted. Check existence first so the documented "returns whether something was actually deleted" contract holds against the real driver, not just the test mock (whose Map.delete() happens to return that for free).

      Parameters

      • collectionName: string
      • id: string

      Returns Promise<boolean>

    • Delete every object matching where (build one with filter()). Pass { verbose: true } to get back the per-object outcome in result.objects; otherwise only the aggregate counts are populated.

      Type Parameters

      • V extends boolean = false

      Parameters

      Returns Promise<WeaviateDeleteManyResult<V>>