# Is hybrid search with multiple queries possible?

**URL:** <https://forum.weaviate.io/t/is-hybrid-search-with-multiple-queries-possible/20778>\
**Category:** Support\
**Created:** [April 24, 2025, 5:47pm UTC](https://forum.weaviate.io/t/is-hybrid-search-with-multiple-queries-possible/20778 "2025-04-24T17:47:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RisingOrange](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/risingorange/32/7159_2.png) [@RisingOrange](https://forum.weaviate.io/u/RisingOrange)\
**Post date:** [April 24, 2025, 5:47pm UTC](https://forum.weaviate.io/t/is-hybrid-search-with-multiple-queries-possible/20778/1 "2025-04-24T17:47:34Z")

</div>

### Description

For `near_text` search, you can provide multiple query vectors for the same target vector:

> **[Multiple target vectors | Weaviate Documentation](https://docs.weaviate.io/weaviate/search/multi-vector)**
>
> In a multi-target vector search, Weaviate searches multiple target vector spaces concurrently. These results are combined using a "join strategy" to produce a single set of search results.

Is something like this also supported for hybrid search? The search would require an array of query texts and an array of query vectors.

My use case is that I’m splitting a long document into chunks, and then want to search the vector database by each chunk using a hybrid search. The results should be combined using a “join strategy”, as described here: [Multiple target vectors | Weaviate Documentation](https://weaviate.io/developers/weaviate/search/multi-vector#available-join-strategies)

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [April 28, 2025, 2:05pm UTC](https://forum.weaviate.io/t/is-hybrid-search-with-multiple-queries-possible/20778/2 "2025-04-28T14:05:00Z")

</div>

hi @RisingOrange !

Welcome to our community 🤗

The document you linked is doing in fact a `collection.query.near_vector` 🤔

I believe this is what you want:

```python
from weaviate.classes.query import HybridVector, Move, HybridFusion

jeopardy = client.collections.get("JeopardyQuestion")
response = jeopardy.query.hybrid(
    query="California",
    max_vector_distance=0.4, # Maximum threshold for the vector search component
    vector=HybridVector.near_vector(
        vector=[v1, v2]
    ),
    alpha=0.75,
    limit=5,
)

```

Let me know if this helps!

---

<div class="post-metadata">

**Author:** ![RisingOrange](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/risingorange/32/7159_2.png) [@RisingOrange](https://forum.weaviate.io/u/RisingOrange)\
**Post date:** [April 28, 2025, 4:13pm UTC](https://forum.weaviate.io/t/is-hybrid-search-with-multiple-queries-possible/20778/3 "2025-04-28T16:13:15Z")

</div>

Thanks, that’s helpful!

I tried the code on weaviate 4.13.2 and got “Providing lists of lists has been deprecated. Please provide a dictionary with target names as keys and lists of numbers as values.”

I modified it and now have this version, which works:

```python
from weaviate.classes.query import HybridVector

chunks = split_query(query_text)
chunk_vectors = generate_embeddings(chunks)

response = collection.query.hybrid(
    query=query_text,
    target_vector="corpus_vector",
    vector=HybridVector.near_vector(
        vector={"corpus_vector": chunk_vectors},
    ),
    max_vector_distance=similarity_threshold,
    alpha=0.75,
    limit=5,
)

```

However, I think the results would be different if the `collection.query.hybrid` function allowed to pass multiple text queries, instead of just allowing one query string. Splitting the query text, doing a BM25F query for each one and then combining the results would give a different result than just doing one BM25F query on the whole query, right?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [April 28, 2025, 5:40pm UTC](https://forum.weaviate.io/t/is-hybrid-search-with-multiple-queries-possible/20778/4 "2025-04-28T17:40:55Z")

</div>

The text queries will boil down to tokens for the bm25 phase of the search

So

```auto
query = "This query has multiple tokens"

```

will be the same as

```python
query = [
    ["this", "query"], 
    ["has", "multiple", "tokens"]
]

```

Let me know if this helps!
