haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Metadata-Filtering not working with Milvus2DocumentStore

Open nutrapur opened this issue 3 years ago • 2 comments

Describe the bug Metadata filtering does not work with Milvus2DocumentStore and is ignored. Tested in combination with SQLite.

Expected behavior

With the following pipeline only documents with the groups of the filters should be displayed, but the filter is ignored. Other DocumentStores (WeaviateDocumentStore, OpenSearchDocumentStore) behave as expected.

result = pipeline.run(
    query="international climate conferences",
    params={
        "Retriever": {
            "top_k": 10,
            "filters": {"group": ["A", "B"]}
        }
    }
)

FAQ Check

System:

  • OS: OSX
  • GPU/CPU: CPU
  • Haystack version (commit or version number): 1.7.0
  • DocumentStore: Milvus2DocumentStore
  • Retriever: DensePassageRetriever

nutrapur avatar Aug 15 '22 18:08 nutrapur

@bogdankostic - this issue mentions what you also describe in #2641 - I'm not sure if this is something we are already working on.

TuanaCelik avatar Aug 16 '22 20:08 TuanaCelik

Hi @nutrapur, as Tuana pointed out, this is a known issue to us. The reason that filtering is not implemented for Milvus2 is that Milvus currently only allows filtering for scalar data types. One possibility to still have filtering in Milvus2DocumentStore might be via the SQLDocumentStore. This is currently not one of our priorities, so I will put your issue in our backlog.

bogdankostic avatar Aug 17 '22 14:08 bogdankostic

Closing as Milvus support is now external https://github.com/milvus-io/milvus-haystack

masci avatar Sep 13 '23 14:09 masci