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]Issue with Qdrant Collection Configuration Filter in JSON Payload #910

Closed
samsam002 opened this issue Sep 12, 2023 · 10 comments · Fixed by #912
Closed

[BUG]Issue with Qdrant Collection Configuration Filter in JSON Payload #910

samsam002 opened this issue Sep 12, 2023 · 10 comments · Fixed by #912

Comments

@samsam002
Copy link

samsam002 commented Sep 12, 2023

Description:
I am trying to send a JSON payload with a specific filter configuration according to the Flowise documentation. However, I am encountering issues with the filter not working as expected.

JSON Payload:


{
    "question": "isms",
    "overrideConfig": {
        "qdrantCollectionCofiguration": {
            "filter": {
                "must": [
                    {
                        "key": "classuers",
                        "match": {
                            "any": [
                                "black",
                                "yellow"
                            ]
                        }
                    }
                ]
            }
        }
    }
}

Expected Outcome:
I expected the filter to work correctly, filtering the results based on the classuers field matching any of the specified values ("black", "yellow").

But it never filters the output.

Here is the strucutre of points in Qdrant
image

@Anush008
Copy link
Contributor

Hey @samsam002. Could you provide your flow-setup?

@samsam002
Copy link
Author

hey, here is it,
image

@samsam002
Copy link
Author

thanks for the reactivity,
the steps are as mentioned in the issue, the qdrant vector store already contains data upserted outside of the flow, it does return relevant information but from the whole collection,
i tried all the possible combination to apply the filters, still get the search result without filters applied. in qdrant dashboard console, they get filtered successfully.

i'm wondering if the args qdrantCollectionCofiguration is even meant for filtering ?

@Anush008
Copy link
Contributor

Anush008 commented Sep 12, 2023

I seem to have found the issue here. You're trying to filter the results by passing the filter obj to the qdrantCollectionConfiguration property, which is meant to receive a collection creation config.
https://github.com/qdrant/qdrant-js/blob/b9f9333c491c41819518f4e58d6df002a7032108/packages/js-client-rest/src/openapi/generated_schema.ts#L1093-L1134

@samsam002
Copy link
Author

thanks for the feedback, any clue to get filtered result as in the "pinecone load existing " one ?

@Anush008
Copy link
Contributor

As of now, the filters params aren't configurable when querying with Flowise and Qdrant.

I'll see to parameterize this value.

@samsam002

This comment was marked as off-topic.

@Anush008
Copy link
Contributor

I'm working on adding the filter. Should be done by today if everything goes right. I'll let you know when the PR is up.

@Anush008
Copy link
Contributor

Anush008 commented Sep 12, 2023

@samsam002, you can checkout #912.

{
   "question":"Your question",
   "overrideConfig":{
      "qdrantFilter":{
         "must":[
            {
               "key":"classuers",
               "match":{
                  "any":[
                     "black",
                     "yellow"
                  ]
               }
            }
         ]
      }
   }
}

Should be usable now.

@samsam002
Copy link
Author

GREAT thanks to you. i'll test it out and feed back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants