Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: AmbiguousIndexName when create local vectorStore #2271

Open
1 task done
ezscode opened this issue Sep 24, 2024 · 1 comment
Open
1 task done

[Bug]: AmbiguousIndexName when create local vectorStore #2271

ezscode opened this issue Sep 24, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@ezscode
Copy link

ezscode commented Sep 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I try to create local vectorStore following https://milvus.io/docs/zh/integrate_with_llamaindex.md

vector_store = MilvusVectorStore(uri="./milvus_demo.db", dim=1536, overwrite=True)

But got error :

RPC error: [describe_index], <AmbiguousIndexName: (code=1, message=There are multiple indexes, please specify the index_name.)>, <Time:{'RPC start': '2024-09-24 09:29:48.706720', 'RPC error': '2024-09-24 09:29:48.707154'}>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py", line 306, in __init__
    self._create_index_if_required()
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py", line 790, in _create_index_if_required
    self._create_dense_index()
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py", line 801, in _create_dense_index
    index_exists = self._collection.has_index()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/orm/collection.py", line 1451, in has_index
    conn.describe_index(self._name, index_name, timeout=timeout, **copy_kwargs) is not None
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/decorators.py", line 148, in handler
    raise e from e
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/decorators.py", line 144, in handler
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/decorators.py", line 183, in handler
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/decorators.py", line 123, in handler
    raise e from e
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/decorators.py", line 87, in handler
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pc087/miniconda3/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 1063, in describe_index
    raise AmbiguousIndexName(message=ExceptionsMessage.AmbiguousIndexName)
pymilvus.exceptions.AmbiguousIndexName: <AmbiguousIndexName: (code=1, message=There are multiple indexes, please specify the index_name.)>
>>> 

What's wrong with it ?
How to create local vectorStore ?

Expected Behavior

I want to create a milvus_demo.db locally.

Steps/Code To Reproduce behavior

from llama_index.core import VectorStoreIndex, StorageContext
from llama_index.vector_stores.milvus import MilvusVectorStore


vector_store = MilvusVectorStore(
    uri="./milvus_demo.db", dim=1536, overwrite=True
)

Environment details

- macOS M2 14.3 
- pip install pymilvus ( 2.4.6 )

Anything else?

I try to connect localhost:19530 and successed。

@ezscode ezscode added the kind/bug Something isn't working label Sep 24, 2024
@axhiao
Copy link

axhiao commented Sep 25, 2024

I think this is a bug. But I found a solution with below setting:

from pymilvus.settings import Config
Config.IndexName = "vector"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants