# Help Needed: Resolving WeaviateQueryError with Nil or Zero-Length Vector at docID 715

**URL:** <https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876>\
**Category:** Support\
**Created:** [April 1, 2024, 11:22pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876 "2024-04-01T23:22:38Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [April 1, 2024, 11:22pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/1 "2024-04-01T23:22:38Z")

</div>

### Description

I am experiencing a `WeaviateQueryError` related to a nil or zero-length vector at `docID 715` during a vector search query in Weaviate. This issue is preventing successful queries within my `menuitemembeddings` index. The error specifically mentions a failure with a message about the vector search at index `menuitemembeddings`, indicating

> a “nil or zero-length vector at docID 715”.

> **Full Log Output**
>
> \_InactiveRpcError Traceback (most recent call last)  
> File ~/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/weaviate/collections/grpc/query.py:609, in \_QueryGRPC.\_\_call(self, request)  
> 608 res: search\_get\_pb2.SearchReply # According to PEP-0526  
> → 609 res, \_ = self.\_connection.grpc\_stub.Search.with\_call(  
> 610 request,  
> 611 metadata=self.\_connection.grpc\_headers(),  
> 612 timeout=self.\_connection.timeout\_config.query,  
> 613 )  
> 615 return res
> 
> File ~/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/grpc/\_channel.py:1193, in \_UnaryUnaryMultiCallable.with\_call(self, request, timeout, metadata, credentials, wait\_for\_ready, compression)  
> 1187 (  
> 1188 state,  
> 1189 call,  
> 1190 ) = self.\_blocking(  
> 1191 request, timeout, metadata, credentials, wait\_for\_ready, compression  
> 1192 )  
> → 1193 return \_end\_unary\_response\_blocking(state, call, True, None)
> 
> File ~/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/grpc/\_channel.py:1005, in \_end\_unary\_response\_blocking(state, call, with\_call, deadline)  
> 1004 else:  
> → 1005 raise \_InactiveRpcError(state)
> 
> \_InactiveRpcError: \<\_InactiveRpcError of RPC that terminated with:  
> …  
> 615 return res  
> 617 except grpc.RpcError as e:  
> → 618 raise WeaviateQueryError(e.details(), “GRPC search”)
> 
> WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index menuitemembeddings: shard menuitemembeddings\_fkq12e2IPcaZ: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 715.

I’m seeking guidance on how to diagnose and resolve this issue, particularly how to investigate the problematic `docID 715` and strategies for cleansing or recovering the database to avoid similar errors in the future.

### Server Setup Information

- Weaviate Server Version: [cr.weaviate.io/semitechnologies/weaviate:1.24.6](http://cr.weaviate.io/semitechnologies/weaviate:1.24.6)
- Deployment Method: docker
- Multi Node? N/A
- Client Language and Version: Python 3.9.5

### Any additional Information

I’m working in a local Docker setup with a “bring your own vectors” configuration using multi-vectors. The configuration involves various named vectors, including “menu\_item\_embedding”, “name\_embedding”, and “description\_embedding”. Here is a snippet of my configuration:

```python
vectorizer_config=[
    wvcc.Configure.NamedVectors.none(name="menu_item_embedding"),
    wvcc.Configure.NamedVectors.none(name="name_embedding"),
    wvcc.Configure.NamedVectors.none(name="description_embedding"),
],

```

- It also seems like these aren’t the only `docID`s which suffer from this issue.
- The dimensionality of these particular entries (and surrounding entries) for all three vectors seem to be 1024.

1. What does the error actually mean? Is it related to how the vector is stored or how the distance is calculated?
2. How can I can investigate further and cleanse my index of these probematic vectors?
3. Hints to detect this prior to insertion would be helpful in the future

🙏🙏Thank you if you read this far 🙏🙏

---

<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 5, 2024, 7:04pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/2 "2024-04-05T19:04:50Z")

</div>

Hi! Do you see any outstanding logs in the server side?

Also, how big is this dataset?

Did you have any issues in ingestion? This could be a corrupted index.

Have you tried reindexing?

---

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [April 5, 2024, 10:40pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/3 "2024-04-05T22:40:14Z")

</div>

Hi @DudaNogueira  
Thank you for taking the time to respond! Sorry if my answers are inaccurate or a bit long-winded. I’m still quite new to this tech.

> Hi! Do you see any outstanding logs in the server side?

It’s hard for me to say for certain, but nothing at the time of querying.  
Occasionally I have some WSL2 issues and need to kill docker etc… Perhaps this is a clue in the logs to some indexing error?

```auto
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_menu_category_id_searchable/segment-1712350772127760700","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_menu_item_id/segment-1712350783095419100","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_ref_product_id_searchable/segment-1712350783062882400","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_data/segment-1712350793589253900","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_menu_product_id_searchable/segment-1712350783805691800","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_menu_item_id_searchable/segment-1712350783658625000","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}
{"action":"lsm_recover_from_active_wal","class":"MenuItemEmbeddings","index":"menuitemembeddings","level":"warning","msg":"active write-ahead-log found. Did weaviate crash prior to this? Trying to recover...","path":"/var/lib/weaviate/menuitemembeddings/WSp0ViJvJhT2/lsm/property_data_searchable/segment-1712350774067835900","shard":"WSp0ViJvJhT2","time":"2024-04-05T22:06:09Z"}

```

> Also, how big is this dataset?

~320k entries  
~383mb on disk

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/1/151500f465fd085dbb1adb270250f5917751288a.png)

> Did you have any issues in ingestion? This could be a corrupted index.

I’d like to know more about this. How could I potentially identify a corrupt index more specifically?

> Have you tried reindexing?

Both times I’ve tried to index, the process has needed to be restarted. Here is my rough code for skipping forward to the latest index item.

What strikes me as odd is the particularly low `docID 715`. Instinctively, I would assume this to be some sort of internal sequence number and then a failure at the 715th document in the indexing process would make sense to me.

```python
# Perform insertion in batches
for i in tqdm(range(0, len(import_data), BATCH_SIZE)):
    batch = import_data[i:i+BATCH_SIZE]
    menu_item_embeddings = []

    for data in batch:

        # Check if the menu item already exists in the collection
        exists = menu_item_embeddings_collection.query.fetch_objects(
            filters=wvc.query.Filter.by_property("menu_item_id").equal(data["id"])
        )

        if len(exists.objects) > 0:
            skip_count += 1
            continue

        # Transform the existing object into the Weaviate format
        weaviate_menu_item = wvc.data.DataObject(
            properties={
                "menu_item_id": data["id"],
                "menu_product_id": data["menu_product_id"],
                "menu_id": data["menu_id"],
                "menu_category_id": data["menu_category_id"],
                "ref_product_id": data["ref_product_id"],
                "data": data["data"],
            },
            vector={
                "name_embedding": from_bytes_to_list(data["name_embedding"]),
                "description_embedding": from_bytes_to_list(data["description_embedding"]),
                "menu_item_embedding": from_bytes_to_list(data["menu_item_embedding"])
            }
        )

        # Ensure the vectors are non-empty
        # TODO: Could become a sanity check function in the future
        if len(weaviate_menu_item.vector["name_embedding"]) == 0:
            continue
        if len(weaviate_menu_item.vector["description_embedding"]) == 0:
            continue
        if len(weaviate_menu_item.vector["menu_item_embedding"]) == 0:
            continue

        # If everything is okay, stage this for insertion
        menu_item_embeddings.append(weaviate_menu_item)

    if len(menu_item_embeddings) == 0:
        continue

    print(f'Skipped batch {skip_count}')
    skip_count = 0

    try:
        menu_item_embeddings_collection.data.insert_many(menu_item_embeddings) # This uses batching under the hood
    except Exception as e:
        print(f'Error: {e}')
        print([x.vector['name_embedding'] for x in menu_item_embeddings] )

```

## Additional notes

I was attempting to verify the dimensionality of the vectors in the sequential range around the “corrupt” vector, but I couldn’t find any clues

```python
import json
from utils.menu_utils import MenuUtils
results = menu_item_embeddings_collection.query.fetch_objects(limit=722, include_vector=True)

# Find and print docs at index 714, 715 and 716
for i in range(712, 722):
    print(f'Index: {i}')

    if(i == 716):
        print(f' Name: {MenuUtils.get_name(json_obj)}')
        print(f' Vector: {len(name_embedding)}')
        continue
    json_obj = json.loads(results.objects[i].properties['data'])

    name_embedding = results.objects[i].vector['menu_item_embedding']
    print(f'Name: {MenuUtils.get_name(json_obj)}')
    print(f'Vector: {len(name_embedding)}')

```

[This is the only code](https://github.com/weaviate/weaviate/blob/8b148c6fac681ccecfa7610cacd6adffed6444ed/adapters/repos/db/vector/hnsw/index.go#L491-L492) I found which could seem to cause this error and I couldn’t find any vectors of 0-length in my collection 🤷

---

<div class="post-metadata">

**Author:** ![nicholasamiller](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/nicholasamiller/32/1255_2.png) [@nicholasamiller](https://forum.weaviate.io/u/nicholasamiller)\
**Post date:** [April 6, 2024, 8:12am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/4 "2024-04-06T08:12:24Z")

</div>

I got this error also, same version of Weaviate.  
It happens every time I restart the docker container.  
Maybe something to do with shutdown corrupts the index in the docker volume.

---

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [April 6, 2024, 10:15am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/5 "2024-04-06T10:15:31Z")

</div>

Thanks for your addition @nicholasamiller 🙏

## Update

I initially thought there was something wrong with how I was building the vectors before inserting them with a None vectorization config `wvc.config.Configure.Vectorizer.none()`

However, my `wvc.config.Configure.NamedVectors.text2vec_openai` collection just broke now as well with a similar error.

## Collection Setup

Here is the setup for that collection.

```auto
client.collections.create(
    name=COLLECTION_NAME,
    description="Collection of menu items with embeddings",
    properties=[
        wvc.config.Property(name="menu_item_id", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="menu_product_id", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="menu_id", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="menu_category_id", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="ref_product_id", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="data", data_type=wvc.config.DataType.TEXT),

    ],
    vectorizer_config=[
                    wvc.config.Configure.NamedVectors.text2vec_openai(
                name="menu_item_embedding", source_properties=["menu_item_text"]
            ),
                    wvc.config.Configure.NamedVectors.text2vec_openai(
                name="name_embedding", source_properties=["name"]
            ),
                    wvc.config.Configure.NamedVectors.text2vec_openai(
                name="description_embedding", source_properties=["description"]
            )
    ],
)

```

## Error

```auto
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask/app.py", line 1488, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask/app.py", line 1466, in wsgi_app
    response = self.handle_exception(e)
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/server.py", line 76, in search_menu_items
    response = menu_item_embeddings_collection.query.near_text(
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/weaviate/collections/queries/near_text/query.py", line 90, in near_text
    res = self._query.near_text(
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/weaviate/collections/grpc/query.py", line 418, in near_text
    return self.__call(request)
  File "/home/van/Pgammin/Qopla/qMenuAnalysis/.venv/lib/python3.9/site-packages/weaviate/collections/grpc/query.py", line 618, in __call
    raise WeaviateQueryError(e.details(), "GRPC search") # pyright: ignore
weaviate.exceptions.WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index openai_menuitemembeddings: shard openai_menuitemembeddings_v7FoIMDvjzTp: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 605.

```

## Additional Notes

1. The `docID` is consistent between docker contain restarts
2. No docker container logs are emitted at the time of triggering the query

## Questions

1. Is there any tooling for me to check the health of my index?
2. Is it possible to directly inspect a vector based on the `docId`?
3. Is there any recommendation you have the filesystem side to create a restore point? (my DB doesn’t change very often)

---

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [April 7, 2024, 7:44pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/6 "2024-04-07T19:44:41Z")

</div>

This has now happened with a 3rd collection (separate docker instance)

```auto
Traceback (most recent call last):
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask/app.py", line 1488, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask/app.py", line 1466, in wsgi_app
    response = self.handle_exception(e)
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
  File "/home/van/Pgammin/ReGPT/backend/server.py", line 137, in search_conversations
    response = conversation_collection.query.near_text(
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/weaviate/collections/queries/near_text/query.py", line 90, in near_text
    res = self._query.near_text(
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/weaviate/collections/grpc/query.py", line 418, in near_text
    return self.__call(request)
  File "/home/van/Pgammin/ReGPT/.venv/lib/python3.9/site-packages/weaviate/collections/grpc/query.py", line 618, in __call
    raise WeaviateQueryError(e.details(), "GRPC search") # pyright: ignore
weaviate.exceptions.WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index conversations: shard conversations_gMerlVoh5Zup: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 252.

```

This is after restarting my PC without explicitly shutting down WSL2 or Docker.

## Questions

1. Can I diagnose/heal my index somehow without re-inserting all the data?
2. Do I need to make periodic backups?

Right now, I’m concerned to put more data into my Weaviate instances. Also, I’m especially hesitate to modify data that will be lost if I need to “reindex” (which also cost when calculating the embeddings)

---

<div class="post-metadata">

**Author:** ![nicholasamiller](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/nicholasamiller/32/1255_2.png) [@nicholasamiller](https://forum.weaviate.io/u/nicholasamiller)\
**Post date:** [April 7, 2024, 11:03pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/7 "2024-04-07T23:03:14Z")

</div>

I tried to reproduce this using the jeopardy sample dataset, adding named vectors. Could not reproduce. I will try to reproduce the problem on a Linux machine: issue could be Docker desktop on Windows.

---

<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 12, 2024, 1:42pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/8 "2024-04-12T13:42:28Z")

</div>

Hi @puj !

I was able to create the class you provided, I notice that you may want to use deterministic IDs, as you added some logic to avoid inserting the object twice

> **[Create objects | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/manage-data/create#generate-deterministic-ids)**
>
> The examples on this page demonstrate how to create individual objects in Weaviate.

Also I noticed you are leaving some properties to AUTO SCHEMA to create while on import. My suggestion is to create all properties before hand, specially the ones you are using for named vectors.

But I was not able to reproduce this.

Can you create a minimum reproducible example in a python notebook?

---

<div class="post-metadata">

**Author:** ![mastermind](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/mastermind/32/1305_2.png) [@mastermind](https://forum.weaviate.io/u/mastermind)\
**Post date:** [April 13, 2024, 8:56pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/9 "2024-04-13T20:56:34Z")

</div>

I have same issue.

Here is error i get:  
`weaviate.exceptions.WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index subclassconfiguration: shard subclassconfiguration_uOWO1ZhUXD9g: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1830.`

This hapens if docker-compose is restarted via docker-compose down \> docker-compose up.

Here is my workflow from start to finish:

First i create db schema:

Than i import data in to database.

Than after schema is created  
before i restart both methods work. I can search both using  
collection.generate.near\_text  
and  
collection.query.near\_text

And it works it returns results. In case of vector search it returns records. In case of generative search it returns message from gpt aditionaly i can fetch references related to found records.

Than i do docker-compose down =\> docker-compose up -d  
And when i try to seacrh using vector i get error like: `distance between entrypoint and query node: got a nil or zero-length vector at docID 1830`

But i still can search normaly using collection.query.fetch\_objects  
And there i can include vecctor and it will be included in response. So does exists.

Also i have set up a script to check for null or lenght \< 0 script it found no invalid vectors.

But if i try to search i get same error discussed above.

Also i could not find any way in documentation to reindex existing records in db.  
Is there no staight forward way to manualy triger reindexing of existing records in db. It seams that the only way to use weaviate is to never stop docker-compose. And if it does stop for some reason. The only way to make it back working again. Is fully recreating it from initial point. So create collections. Than insert data in to them. And than it is posible to search using vectors. That is until server crashes for one reason or another. Than all this process have to be one again. Is it suposed to be this way? What is sugested workflow for shuting down docker-compose and than turning it back on. For instance i can not create collections localy and than transfer that data to server. In this case my vectors get corupte and i get error above. So the only way woudl be to run docker-compose on remote server and than generate vectors there so it works. Unitl server restart.

If anything else need to be provided please let me know.

---

<div class="post-metadata">

**Author:** ![nicholasamiller](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/nicholasamiller/32/1255_2.png) [@nicholasamiller](https://forum.weaviate.io/u/nicholasamiller)\
**Post date:** [April 15, 2024, 6:41am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/10 "2024-04-15T06:41:33Z")

</div>

Problem “solved” when I changed by schema to index on one vector only: no multiple named vectors.  
So without really having any idea, I would speculate, wildly, that there is a bug to do with some state, maybe IDs, that are created when adding data objects with multiple named vectors. This state may not be properly serialized to disk. So when the container restarts, it is not loaded into memory, and all the queries fail.  
Multiple named vectors are recent feature.  
Anyway, I can adjust to make do with a single vector for the moment.  
I can’t reproduce without sharing all my data.  
My data has 14380 objects at the moment. About 400Mb.  
No cross references.  
Provided my own vectors.  
Problem occurred on both Ubuntu and Windows, anytime the weaviate container restarted.

---

<div class="post-metadata">

**Author:** ![smwitkowski](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/smwitkowski/32/1174_2.png) [@smwitkowski](https://forum.weaviate.io/u/smwitkowski)\
**Post date:** [April 18, 2024, 2:42am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/11 "2024-04-18T02:42:08Z")

</div>

> I will try to reproduce the problem on a Linux machine: issue could be Docker desktop on Windows.

I am facing this when using an embedded instance on MacOS as well.

---

<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 18, 2024, 6:41pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/12 "2024-04-18T18:41:09Z")

</div>

# Edit: [version 1.24.11 fix this bug!](https://github.com/weaviate/weaviate/releases/tag/v1.24.11)

Hi there dear friends!!!

Welcome to our community @smwitkowski !! 🤗

Our team is already aware of this and were able to reproduce. Here is the GH issue:

> <https://github.com/weaviate/weaviate/issues/4692>
>
> \### How to reproduce this bug?
> 
> 1. I have used docker to start weaviate version …1.24.8
> 2. Single node cluster
> 3. Create a multi vector schema or collection.
> 4. Add objects . I have added around 10k objects and could still reproduce the issue.
> 5. Perform \`near\_text\` or \`near\_vector\` query.
> 6. Restart the docker container
> 7. Run the query again
> 
> Code snippet below
> \`\`\`
> import weaviate
> import weaviate.classes.config as wvc
> 
> client = weaviate.connect\_to\_local(
> port=8080,
> grpc\_port=50051,
> headers={
> "X-OpenAI-Api-Key": "" # Replace with your inference API key
> }
> )
> 
> if (client.collections.exists("NamedVector")):
> # delete collection "Article" - THIS WILL DELETE THE COLLECTION AND ALL ITS DATA
> client.collections.delete("NamedVector") 
> 
> collection = client.collections.create(
> name="NamedVector",
> description="Collection of menu items with embeddings",
> properties=\[
> wvc.Property(name="menu\_item\_id", data\_type=wvc.DataType.TEXT),
> wvc.Property(name="description", data\_type=wvc.DataType.TEXT),
> wvc.Property(name="name", data\_type=wvc.DataType.TEXT),
> \],
> vectorizer\_config=\[
> wvc.Configure.NamedVectors.text2vec\_openai(
> name="name\_embedding", source\_properties=\["name"\]
> ),
> wvc.Configure.NamedVectors.text2vec\_openai(
> name="description\_embedding", source\_properties=\["description"\]
> )
> \],
> )
> 
> \# BatchImportWithNamedVectors
> record = 10000
> data\_rows = \[{
> "menu\_item\_id": f"Object {i+1}",
> "description": f"Body {i+1}",
> "name": f"Body {i+1}",
> } for i in range(record)\]
> 
> name\_vectors = \[\[0.12\] \* 1536 for \_ in range(record)\]
> description\_vectors = \[\[0.34\] \* 1536 for \_ in range(record)\]
> menu\_item\_id\_vectors = \[\[0.38\] \* 1536 for \_ in range(record)\]
> 
> collection = client.collections.get("NamedVector")
> 
> # highlight-start
> with collection.batch.dynamic() as batch:
> for i, data\_row in enumerate(data\_rows):
> batch.add\_object(
> properties=data\_row,
> vector={
> "name": name\_vectors\[i\],
> "description": description\_vectors\[i\],
> "menu\_item\_id": menu\_item\_id\_vectors\[i\],
> }
> )
> # highlight-end
> # END BatchImportWithNamedVectors
> 
> from weaviate.classes.query import MetadataQuery
> 
> reviews = client.collections.get("NamedVector")
> response = reviews.query.near\_text(
> query="Health and healthcare products",
> target\_vector="description\_embedding", # Specify the target vector for named vector collections
> return\_metadata=MetadataQuery(distance=True)
> )
> 
> for o in response.objects:
> print(o.properties)
> print(o.metadata.distance)
> 
> from weaviate.classes.query import MetadataQuery
> 
> query\_vector = \[1.0\]\* 1536
> jeopardy = client.collections.get("NamedVector")
> response = jeopardy.query.near\_vector(
> near\_vector=query\_vector, # your query vector goes here
> target\_vector="description\_embedding",
> return\_metadata=MetadataQuery(distance=True)
> )
> 
> for o in response.objects:
> print(o.properties)
> print(o.metadata.distance)
> 
> \`\`\`
> 
> \### What is the expected behavior?
> 
> No error message should be displayed and the query should work without any issues even after docker is restarted.
> 
> \### What is the actual behavior?
> 
> Full stack trace below
> \`\`\`
> {
> "name": "WeaviateQueryError",
> "message": "Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115.",
> "stack": "---------------------------------------------------------------------------
> \_InactiveRpcError Traceback (most recent call last)
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/grpc/query.py:609, in \_QueryGRPC.\_\_call(self, request)
> 608 res: search\_get\_pb2.SearchReply # According to PEP-0526
> \--\> 609 res, \_ = self.\_connection.grpc\_stub.Search.with\_call(
> 610 request,
> 611 metadata=self.\_connection.grpc\_headers(),
> 612 timeout=self.\_connection.timeout\_config.query,
> 613 )
> 615 return res
> 
> File ~/Downloads/projectWorkspace/pythonv4Testing/.venv/lib/python3.12/site-packages/grpc/\_channel.py:1177, in \_UnaryUnaryMultiCallable.with\_call(self, request, timeout, metadata, credentials, wait\_for\_ready, compression)
> 1171 (
> 1172 state,
> 1173 call,
> 1174 ) = self.\_blocking(
> 1175 request, timeout, metadata, credentials, wait\_for\_ready, compression
> 1176 )
> \-\> 1177 return \_end\_unary\_response\_blocking(state, call, True, None)
> 
> File ~/Downloads/projectWorkspace/pythonv4Testing/.venv/lib/python3.12/site-packages/grpc/\_channel.py:1003, in \_end\_unary\_response\_blocking(state, call, with\_call, deadline)
> 1002 else:
> \-\> 1003 raise \_InactiveRpcError(state)
> 
> \_InactiveRpcError: \<\_InactiveRpcError of RPC that terminated with:
> \\tstatus = StatusCode.UNKNOWN
> \\tdetails = \\"explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115\\"
> \\tdebug\_error\_string = \\"UNKNOWN:Error received from peer {created\_time:\\"2024-04-17T16:12:32.705521+05:30\\", grpc\_status:2, grpc\_message:\\"explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115\\"}\\"
> \>
> 
> During handling of the above exception, another exception occurred:
> 
> WeaviateQueryError Traceback (most recent call last)
> /Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb Cell 8 line 5
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=2'\>3\</a\> query\_vector = \[1.0\]\* 1536
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=3'\>4\</a\> jeopardy = client.collections.get(\\"NamedVector\\")
> \----\> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=4'\>5\</a\> response = jeopardy.query.near\_vector(
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=5'\>6\</a\> near\_vector=query\_vector, # your query vector goes here
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=6'\>7\</a\> target\_vector=\\"description\_embedding\\",
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=7'\>8\</a\> return\_metadata=MetadataQuery(distance=True)
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=8'\>9\</a\> )
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=10'\>11\</a\> for o in response.objects:
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=11'\>12\</a\> print(o.properties)
> 
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/queries/near\_vector/query.py:80, in \_NearVectorQuery.near\_vector(self, near\_vector, certainty, distance, limit, offset, auto\_limit, filters, group\_by, rerank, target\_vector, include\_vector, return\_metadata, return\_properties, return\_references)
> 20 def near\_vector(
> 21 self,
> 22 near\_vector: List\[float\],
> (...)
> 36 return\_references: Optional\[ReturnReferences\[TReferences\]\] = None,
> 37 ) -\> QueryNearMediaReturnType\[Properties, References, TProperties, TReferences\]:
> 38 \\"\\"\\"Search for objects by vector in this collection using and vector-based similarity search.
> 39 
> 40 See the \[docs\](https://weaviate.io/developers/weaviate/search/similarity) for a more detailed explanation.
> (...)
> 78 If the request to the Weaviate server fails.
> 79 \\"\\"\\"
> \---\> 80 res = self.\_query.near\_vector(
> 81 near\_vector=near\_vector,
> 82 certainty=certainty,
> 83 distance=distance,
> 84 limit=limit,
> 85 offset=offset,
> 86 autocut=auto\_limit,
> 87 filters=filters,
> 88 group\_by=\_GroupBy.from\_input(group\_by),
> 89 rerank=rerank,
> 90 target\_vector=target\_vector,
> 91 return\_metadata=self.\_parse\_return\_metadata(return\_metadata, include\_vector),
> 92 return\_properties=self.\_parse\_return\_properties(return\_properties),
> 93 return\_references=self.\_parse\_return\_references(return\_references),
> 94 )
> 95 return self.\_result\_to\_query\_or\_groupby\_return(
> 96 res,
> 97 \_QueryOptions.from\_input(
> (...)
> 107 return\_references,
> 108 )
> 
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/grpc/query.py:296, in \_QueryGRPC.near\_vector(self, near\_vector, certainty, distance, limit, offset, autocut, filters, group\_by, generative, rerank, target\_vector, return\_metadata, return\_properties, return\_references)
> 275 certainty, distance = self.\_\_parse\_near\_options(certainty, distance)
> 277 request = self.\_\_create\_request(
> 278 limit=limit,
> 279 offset=offset,
> (...)
> 293 ),
> 294 )
> \--\> 296 return self.\_\_call(request)
> 
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/grpc/query.py:618, in \_QueryGRPC.\_\_call(self, request)
> 615 return res
> 617 except grpc.RpcError as e:
> \--\> 618 raise WeaviateQueryError(e.details(), \\"GRPC search\\")
> 
> WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115."
> }
> \`\`\`
> 
> \### Supporting information
> 
> Forum link : https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/2
> 
> Also, the issue is seen only in Multi vector class. The only way for now to fix the issue is to reindex the objects.
> 
> \### Server Version
> 
> 1.24.8
> 
> \### Code of Conduct
> 
> \- \[X\] I have read and agree to the Weaviate's \[Contributor Guide\](https://weaviate.io/developers/contributor-guide) and \[Code of Conduct\](https://weaviate.io/service/code-of-conduct)

Thank you all for reporting and being such an amazing community! 🫂

---

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [April 22, 2024, 7:54am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/13 "2024-04-22T07:54:18Z")

</div>

> [@DudaNogueira](#):
>
> Hi there dear friends!!!
> 
> Welcome to our community @smwitkowski !! 🤗
> 
> Our team is already aware of this and were able to reproduce. Here is the GH issue:

Awesome, thanks for the update. Eagerly awaiting this fix 🥳

Thanks everyone for contributing to this report 🙏

---

<div class="post-metadata">

**Author:** ![hejq](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hejq/32/1407_2.png) [@hejq](https://forum.weaviate.io/u/hejq)\
**Post date:** [April 29, 2024, 10:07am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/14 "2024-04-29T10:07:58Z")

</div>

I’m also getting the same issue. I have a docker-compose launched instance with a mounted volume.

1. I copied the volume to a remote server and launch another instance there with the volume mounted. Then I got the error.
2. I want to do some comparison and so I got back to my local instance and restart the container. Then I even got the same error locally.

So I’m also suspecting it related to restarting.

Anyway, glad to see it’s tracked on GH. Is there any workaround before this get fixed?

---

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [April 29, 2024, 10:44am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/15 "2024-04-29T10:44:55Z")

</div>

Linking to the workaround for now

> <https://github.com/weaviate/weaviate/issues/4692#issuecomment-2082400806>
>
> \### How to reproduce this bug?
> 
> 1. I have used docker to start weaviate version …1.24.8
> 2. Single node cluster
> 3. Create a multi vector schema or collection.
> 4. Add objects . I have added around 10k objects and could still reproduce the issue.
> 5. Perform \`near\_text\` or \`near\_vector\` query.
> 6. Restart the docker container
> 7. Run the query again
> 
> Code snippet below
> \`\`\`
> import weaviate
> import weaviate.classes.config as wvc
> 
> client = weaviate.connect\_to\_local(
> port=8080,
> grpc\_port=50051,
> headers={
> "X-OpenAI-Api-Key": "" # Replace with your inference API key
> }
> )
> 
> if (client.collections.exists("NamedVector")):
> # delete collection "Article" - THIS WILL DELETE THE COLLECTION AND ALL ITS DATA
> client.collections.delete("NamedVector") 
> 
> collection = client.collections.create(
> name="NamedVector",
> description="Collection of menu items with embeddings",
> properties=\[
> wvc.Property(name="menu\_item\_id", data\_type=wvc.DataType.TEXT),
> wvc.Property(name="description", data\_type=wvc.DataType.TEXT),
> wvc.Property(name="name", data\_type=wvc.DataType.TEXT),
> \],
> vectorizer\_config=\[
> wvc.Configure.NamedVectors.text2vec\_openai(
> name="name\_embedding", source\_properties=\["name"\]
> ),
> wvc.Configure.NamedVectors.text2vec\_openai(
> name="description\_embedding", source\_properties=\["description"\]
> )
> \],
> )
> 
> \# BatchImportWithNamedVectors
> record = 10000
> data\_rows = \[{
> "menu\_item\_id": f"Object {i+1}",
> "description": f"Body {i+1}",
> "name": f"Body {i+1}",
> } for i in range(record)\]
> 
> name\_vectors = \[\[0.12\] \* 1536 for \_ in range(record)\]
> description\_vectors = \[\[0.34\] \* 1536 for \_ in range(record)\]
> menu\_item\_id\_vectors = \[\[0.38\] \* 1536 for \_ in range(record)\]
> 
> collection = client.collections.get("NamedVector")
> 
> # highlight-start
> with collection.batch.dynamic() as batch:
> for i, data\_row in enumerate(data\_rows):
> batch.add\_object(
> properties=data\_row,
> vector={
> "name": name\_vectors\[i\],
> "description": description\_vectors\[i\],
> "menu\_item\_id": menu\_item\_id\_vectors\[i\],
> }
> )
> # highlight-end
> # END BatchImportWithNamedVectors
> 
> from weaviate.classes.query import MetadataQuery
> 
> reviews = client.collections.get("NamedVector")
> response = reviews.query.near\_text(
> query="Health and healthcare products",
> target\_vector="description\_embedding", # Specify the target vector for named vector collections
> return\_metadata=MetadataQuery(distance=True)
> )
> 
> for o in response.objects:
> print(o.properties)
> print(o.metadata.distance)
> 
> from weaviate.classes.query import MetadataQuery
> 
> query\_vector = \[1.0\]\* 1536
> jeopardy = client.collections.get("NamedVector")
> response = jeopardy.query.near\_vector(
> near\_vector=query\_vector, # your query vector goes here
> target\_vector="description\_embedding",
> return\_metadata=MetadataQuery(distance=True)
> )
> 
> for o in response.objects:
> print(o.properties)
> print(o.metadata.distance)
> 
> \`\`\`
> 
> \### What is the expected behavior?
> 
> No error message should be displayed and the query should work without any issues even after docker is restarted.
> 
> \### What is the actual behavior?
> 
> Full stack trace below
> \`\`\`
> {
> "name": "WeaviateQueryError",
> "message": "Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115.",
> "stack": "---------------------------------------------------------------------------
> \_InactiveRpcError Traceback (most recent call last)
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/grpc/query.py:609, in \_QueryGRPC.\_\_call(self, request)
> 608 res: search\_get\_pb2.SearchReply # According to PEP-0526
> \--\> 609 res, \_ = self.\_connection.grpc\_stub.Search.with\_call(
> 610 request,
> 611 metadata=self.\_connection.grpc\_headers(),
> 612 timeout=self.\_connection.timeout\_config.query,
> 613 )
> 615 return res
> 
> File ~/Downloads/projectWorkspace/pythonv4Testing/.venv/lib/python3.12/site-packages/grpc/\_channel.py:1177, in \_UnaryUnaryMultiCallable.with\_call(self, request, timeout, metadata, credentials, wait\_for\_ready, compression)
> 1171 (
> 1172 state,
> 1173 call,
> 1174 ) = self.\_blocking(
> 1175 request, timeout, metadata, credentials, wait\_for\_ready, compression
> 1176 )
> \-\> 1177 return \_end\_unary\_response\_blocking(state, call, True, None)
> 
> File ~/Downloads/projectWorkspace/pythonv4Testing/.venv/lib/python3.12/site-packages/grpc/\_channel.py:1003, in \_end\_unary\_response\_blocking(state, call, with\_call, deadline)
> 1002 else:
> \-\> 1003 raise \_InactiveRpcError(state)
> 
> \_InactiveRpcError: \<\_InactiveRpcError of RPC that terminated with:
> \\tstatus = StatusCode.UNKNOWN
> \\tdetails = \\"explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115\\"
> \\tdebug\_error\_string = \\"UNKNOWN:Error received from peer {created\_time:\\"2024-04-17T16:12:32.705521+05:30\\", grpc\_status:2, grpc\_message:\\"explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115\\"}\\"
> \>
> 
> During handling of the above exception, another exception occurred:
> 
> WeaviateQueryError Traceback (most recent call last)
> /Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb Cell 8 line 5
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=2'\>3\</a\> query\_vector = \[1.0\]\* 1536
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=3'\>4\</a\> jeopardy = client.collections.get(\\"NamedVector\\")
> \----\> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=4'\>5\</a\> response = jeopardy.query.near\_vector(
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=5'\>6\</a\> near\_vector=query\_vector, # your query vector goes here
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=6'\>7\</a\> target\_vector=\\"description\_embedding\\",
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=7'\>8\</a\> return\_metadata=MetadataQuery(distance=True)
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=8'\>9\</a\> )
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=10'\>11\</a\> for o in response.objects:
> \<a href='vscode-notebook-cell:/Users/aarthiiyer/Downloads/projectWorkspace/pythonv4Testing/alltius/multivector-search.ipynb#W6sZmlsZQ%3D%3D?line=11'\>12\</a\> print(o.properties)
> 
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/queries/near\_vector/query.py:80, in \_NearVectorQuery.near\_vector(self, near\_vector, certainty, distance, limit, offset, auto\_limit, filters, group\_by, rerank, target\_vector, include\_vector, return\_metadata, return\_properties, return\_references)
> 20 def near\_vector(
> 21 self,
> 22 near\_vector: List\[float\],
> (...)
> 36 return\_references: Optional\[ReturnReferences\[TReferences\]\] = None,
> 37 ) -\> QueryNearMediaReturnType\[Properties, References, TProperties, TReferences\]:
> 38 \\"\\"\\"Search for objects by vector in this collection using and vector-based similarity search.
> 39 
> 40 See the \[docs\](https://weaviate.io/developers/weaviate/search/similarity) for a more detailed explanation.
> (...)
> 78 If the request to the Weaviate server fails.
> 79 \\"\\"\\"
> \---\> 80 res = self.\_query.near\_vector(
> 81 near\_vector=near\_vector,
> 82 certainty=certainty,
> 83 distance=distance,
> 84 limit=limit,
> 85 offset=offset,
> 86 autocut=auto\_limit,
> 87 filters=filters,
> 88 group\_by=\_GroupBy.from\_input(group\_by),
> 89 rerank=rerank,
> 90 target\_vector=target\_vector,
> 91 return\_metadata=self.\_parse\_return\_metadata(return\_metadata, include\_vector),
> 92 return\_properties=self.\_parse\_return\_properties(return\_properties),
> 93 return\_references=self.\_parse\_return\_references(return\_references),
> 94 )
> 95 return self.\_result\_to\_query\_or\_groupby\_return(
> 96 res,
> 97 \_QueryOptions.from\_input(
> (...)
> 107 return\_references,
> 108 )
> 
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/grpc/query.py:296, in \_QueryGRPC.near\_vector(self, near\_vector, certainty, distance, limit, offset, autocut, filters, group\_by, generative, rerank, target\_vector, return\_metadata, return\_properties, return\_references)
> 275 certainty, distance = self.\_\_parse\_near\_options(certainty, distance)
> 277 request = self.\_\_create\_request(
> 278 limit=limit,
> 279 offset=offset,
> (...)
> 293 ),
> 294 )
> \--\> 296 return self.\_\_call(request)
> 
> File ~/Downloads/projectWorkspace/weaviate-python-client/weaviate/collections/grpc/query.py:618, in \_QueryGRPC.\_\_call(self, request)
> 615 return res
> 617 except grpc.RpcError as e:
> \--\> 618 raise WeaviateQueryError(e.details(), \\"GRPC search\\")
> 
> WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index namedvector: shard namedvector\_C6ezH9Q2rHxA: vector search: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115."
> }
> \`\`\`
> 
> \### Supporting information
> 
> Forum link : https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/2
> 
> Also, the issue is seen only in Multi vector class. The only way for now to fix the issue is to reindex the objects.
> 
> \### Server Version
> 
> 1.24.8
> 
> \### Code of Conduct
> 
> \- \[X\] I have read and agree to the Weaviate's \[Contributor Guide\](https://weaviate.io/developers/contributor-guide) and \[Code of Conduct\](https://weaviate.io/service/code-of-conduct)

---

<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:** [May 7, 2024, 4:11am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/16 "2024-05-07T04:11:33Z")

</div>

@puj I was able to resolve this issue ([PR](https://github.com/weaviate/weaviate/pull/4857)) Today we will release `v1.24.11` that will contain this fix. I will let you know once the release is ready.

---

<div class="post-metadata">

**Author:** ![puj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/puj/32/1225_2.png) [@puj](https://forum.weaviate.io/u/puj)\
**Post date:** [May 7, 2024, 8:35am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/17 "2024-05-07T08:35:39Z")

</div>

> @puj I was able to resolve this issue ([PR](https://github.com/weaviate/weaviate/pull/4857)) Today we will release `v1.24.11` that will contain this fix. I will let you know once the release is ready.

How lovely! Well done 💪  
Thanks for following up on this!

Was interesting to browse your solution 🕵️‍♂️

---

<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:** [May 7, 2024, 10:48am UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/18 "2024-05-07T10:48:19Z")

</div>

Cool 🙂 and thank you for your kind words!

I just wanted to let you know that the [v1.24.11](https://github.com/weaviate/weaviate/releases/tag/v1.24.11) is out 🙂

---

<div class="post-metadata">

**Author:** ![rjalex](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/rjalex/32/807_2.png) [@rjalex](https://forum.weaviate.io/u/rjalex)\
**Post date:** [May 11, 2024, 2:14pm UTC](https://forum.weaviate.io/t/help-needed-resolving-weaviatequeryerror-with-nil-or-zero-length-vector-at-docid-715/1876/19 "2024-05-11T14:14:42Z")

</div>

> [@puj](#):
>
> [Multivector: knn search: distance between entrypoint and query node: got a nil or zero-length vector at docID 1115 · Issue #4692 · weaviate/weaviate · GitHub](https://github.com/weaviate/weaviate/issues/4692#issuecomment-2082400806)

A LIFE SAVER … I was in the same hell. Multiple named vectors and no default modules and nothing worked. Going from 24.6 to 24.11 fixed this.

Thanks to all of you gals and guys !!!
