deepset-ai / deepset-ai/haystack-core-integrations

How to connect to separate gRPC host in WeaviateDocumentStore

Open
#1,170 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

integration:weaviate P2
Dominant language
Python
Stars
203
Forks
332
Avg merge
2d 4h
Merged PRs (30d)
80

Description

Describe the bug
Hello Haystack team,

I'm currently working with a Weaviate setup where the REST API and gRPC services are hosted on different domains. Specifically, I have:

REST API Host: https://weaviate.xxyy.com
gRPC Host: https://weaviate.grpc.xxyy.com

In the original Weaviate Python client library, it's possible to specify different hosts for the REST and gRPC connections using the ConnectionParams class:

from weaviate.connect import ConnectionParams
import weaviate

connection_params = ConnectionParams.from_params(
    http_host="weaviate.xxyy.com",
    http_port=443,
    http_secure=True,
    grpc_host="weaviate.grpc.xxyy.com",
    grpc_port=443,
    grpc_secure=True,
)
client = weaviate.Client(connection_params=connection_params)

This configuration allows me to connect to the REST API and gRPC services using different hosts and ports.

Issue:

In Haystack's WeaviateDocumentStore, there doesn't seem to be an option to specify separate hosts for the REST API and gRPC connections. The url parameter sets both to the same host, and there's no exposed parameter to set a different gRPC host.

To Reproduce
Here's the current initialization in Haystack:

from haystack_integrations.document_stores.weaviate.document_store import WeaviateDocumentStore
from haystack_integrations.document_stores.weaviate.auth import AuthApiKey

document_store = WeaviateDocumentStore(
    url="https://weaviate.xxyy.com",
    auth_client_secret=AuthApiKey(api_key="your_weaviate_api_key"),
    grpc_secure=True,
)

Describe your environment (please complete the following information):

  • OS: Linux
  • Haystack version: 2.6
  • Integration version:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with haystack_integrations.document_stores.weaviate.document_store.WeaviateDocumentStore and compare its connection setup with the Weaviate ConnectionParams example in the issue. Trace how url and grpc_secure are used, then check the integration's existing tests if available. Done means users can configure separate REST and gRPC hosts and ports while preserving the current connection behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.