# Bug: Hybrid search broken when using cross-references on a class with multi-tenancy enabled

**URL:** <https://forum.weaviate.io/t/bug-hybrid-search-broken-when-using-cross-references-on-a-class-with-multi-tenancy-enabled/443>\
**Category:** Support\
**Tags:** bug\
**Created:** [August 2, 2023, 1:23am UTC](https://forum.weaviate.io/t/bug-hybrid-search-broken-when-using-cross-references-on-a-class-with-multi-tenancy-enabled/443 "2023-08-02T01:23:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/gabriel/32/250_2.png) [@gabriel](https://forum.weaviate.io/u/gabriel)\
**Post date:** [August 2, 2023, 1:23am UTC](https://forum.weaviate.io/t/bug-hybrid-search-broken-when-using-cross-references-on-a-class-with-multi-tenancy-enabled/443/1 "2023-08-02T01:23:21Z")

</div>

Hybrid search is broken when using cross-references on a class with multi-tenancy enabled.

The queries work when using with\_bm25, or with\_near\_vector.

_with\_bm25_

```auto
(client.query.get(
    class_name="Page", 
    properties=["""
        page_no
        content
        book {
        ... on Book {
            name
        }
    }"""])
    .with_bm25(
        query="hole",
        properties=["content"],
    )
    .with_tenant("tenant1")
).do()

-> {'data': {'Get': {'Page': [{'book': [{'name': 'The Lord of the Rings'}],
     'content': 'In a hole in the ground there lived a hobbit.',
     'page_no': 1}]}}}

```

_with\_near\_vector_

```auto
(client.query.get(
    class_name="Page", 
    properties=["""
        page_no
        content
        book {
        ... on Book {
            name
        }
    }"""])
    .with_near_vector({
        "vector":[0.1, 0.2, 0.3]
    })
    .with_tenant("tenant1")
).do()

-> {'data': {'Get': {'Page': [{'book': [{'name': 'The Lord of the Rings'}],
     'content': 'In a hole in the ground there lived a hobbit.',
     'page_no': 1}]}}}

```

_with\_hybrid_

```auto
(client.query.get(
    class_name="Page", 
    properties=["""
        page_no
        content
        book {
        ... on Book {
            name
        }
    }"""])
    .with_hybrid(
        query="hole",
        properties=["content"],
        vector=[0.1, 0.2, 0.3],
        alpha=1.0,
    )
    .with_tenant("tenant1")
).do()

-> {'data': {'Get': {'Page': None}},
 'errors': [{'locations': [{'column': 6, 'line': 1}],
   'message': 'hybrid search post-processing: resolve cross-refs: build reference cache: build request cache: fetch job list: index "book": class Book has multi-tenancy enabled, but request was without tenant',
   'path': ['Get', 'Page']}]}

```

Reproducible case / gist: [multitenant-hybrid.ipynb · GitHub](https://gist.github.com/glesperance/2cdab65954bd961f140f7c0684787db4)

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [August 2, 2023, 10:23am UTC](https://forum.weaviate.io/t/bug-hybrid-search-broken-when-using-cross-references-on-a-class-with-multi-tenancy-enabled/443/2 "2023-08-02T10:23:42Z")

</div>

Hi @gabriel - thanks for letting us know! I’ll pass this onto the team.

---

<div class="post-metadata">

**Author:** ![antas-marcin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/antas-marcin/32/20_2.png) [@antas-marcin](https://forum.weaviate.io/u/antas-marcin)\
**Post date:** [August 3, 2023, 12:05pm UTC](https://forum.weaviate.io/t/bug-hybrid-search-broken-when-using-cross-references-on-a-class-with-multi-tenancy-enabled/443/3 "2023-08-03T12:05:28Z")

</div>

@gabriel [fix](https://github.com/weaviate/weaviate/pull/3331) for this issue has already been merged with `master` and it will be release with `v1.21` next week
