The `weaviate-ts-client` is the official TypeScript client library for interacting with a Weaviate vector database instance. It provides a type-safe and idiomatic interface for operations like data ingestion, schema management, vector search (including BM25 and hybrid search), and various module functionalities such as generative AI and rerankers. The library is currently on its `v3.12.0` stable release, with frequent minor updates addressing new Weaviate features, bug fixes, and performance improvements. Its release cadence is rapid, reflecting active development and close alignment with the Weaviate database's evolving capabilities, ensuring users can quickly leverage the latest features like object TTL, multi-vector search, and rotational quantization. This client is the recommended way to integrate Weaviate into TypeScript and Node.js applications.
npm install weaviate-ts-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes a Weaviate client, creates a new collection if it doesn't exist, adds two data items, and then performs a BM25 search on the collection.
Do not use `weaviate-ts-client@3.7.0`. If you are currently on `3.6.2`, upgrade to `3.8.0` or newer. If you are already on `3.7.0`, downgrade to `3.6.2` or upgrade to `3.8.0+` after reviewing the `v3.8.0` migration notes.
Review the official Weaviate TypeScript client documentation for `v3.8.0` and later. Update type annotations in your codebase to include the necessary generic parameters, often found within the `WeaviateGenerics` namespace, e.g., `WeaviateClient<WeaviateGenerics.Property>`.
Avoid installing or deploying `weaviate-ts-client@3.7.0`. Ensure your project's `package.json` specifies a stable version like `^3.8.0` or later, or `~3.6.2` if backward compatibility is paramount before migrating to `3.8.0+`.
Always instantiate the client using `new WeaviateClient({ ...config })` after a named import: `import { WeaviateClient } from 'weaviate-ts-client';`.Ensure you are using `new WeaviateClient({...})` for instantiation and `import { WeaviateClient } from 'weaviate-ts-client';` for ESM contexts. For CommonJS, consider using dynamic import or transpilation.Verify that your Weaviate instance is running and accessible at the specified `host` and `port`. Check firewall rules and ensure the `scheme` (http/https) matches your Weaviate setup. Double-check environment variables if used for configuration.
Ensure the necessary Weaviate modules are enabled in your Weaviate instance's configuration (e.g., in `docker-compose.yml`). Verify that the vectorizer configuration within your client code matches the module's requirements, including any required API keys for external services.
Explicitly specify the generic type parameters for collection definitions and query results. Review the `WeaviateGenerics` namespace and adapt your types. For query results, ensure you're accessing properties through `result.objects[i].properties` which will have the inferred type.
No dependency data recorded yet.