FlagOpen / FlagEmbedding

Retrieval and Retrieval-augmented LLMs
MIT License
6.14k stars 442 forks source link

BGE-M3 - Milvus JSON index not supported #580

Open Hokyjack opened 4 months ago

Hokyjack commented 4 months ago

Hello, I see your example dense+sparse embeddings of BGE-M3. I have updated the pymilvus using git+https://github.com/milvus-io/pymilvus But when I run the example script, I get an error.

sparse_index = {"index_type": "SPARSE_INVERTED_INDEX", "metric_type": "IP"}
col.create_index("sparse_vector", sparse_index)

RPC error: [create_index], <MilvusException: (code=1100, message=create index on json field is not supported: invalid parameter[expected=supported field][actual=create index on 104 field])>, <Time:{'RPC start': '2024-03-19 14:01:57.235382', 'RPC error': '2024-03-19 14:01:57.238381'}>

It seems for the example you have also used some not-yet released version of Milvus, which already have Sparse index support. How to please update it? Thank you.

staoxiao commented 4 months ago

Sorry, the latest milvus has not been released, so the example cannot be used currently. We have deleted this example.

staoxiao commented 4 months ago

The new version of milvus has been released. You can use the hybrid retrieval of bge-m3 following https://github.com/milvus-io/pymilvus/blob/master/examples/hello_hybrid_sparse_dense.py