go-client icon indicating copy to clipboard operation
go-client copied to clipboard

The query conditions are too complex

Open shzy2012 opened this issue 1 year ago • 2 comments

Can it be simplified, such as supporting map?

json format

POST /collections/chatapp/points/delete
{
    "filter": {
        "must": [
            {
                "key": "source",
                "match": {
                    "value": "example.pdf"
                }
            }
        ]
    }
}

to ----->

go code image

shzy2012 avatar Apr 07 '24 08:04 shzy2012

or

	filter := map[string]interface{}{
		"filter": map[string]interface{}{
			"must": []map[string]interface{}{
				{
					"key": "source",
				},
				{
					"match": map[string]string{
						"value": "example.pdf",
					},
				},
			},
		},
	}

shzy2012 avatar Apr 07 '24 08:04 shzy2012

Agreed. I had to recode a Qdrant http client in go, because the GRPC is over complicated, especially on filters management. Qdrant is very great, and for those who dont want to use Langchain go...

Matthieu-Coddity avatar Jun 26 '24 08:06 Matthieu-Coddity

Hey. We released a revamp of the SDK that improves this. Please refer to https://qdrant.tech/documentation/concepts/filtering/#filtering-clauses

Anush008 avatar Sep 09 '24 11:09 Anush008