cURL
curl --request POST \ --url https://{projectHost}/collections/{collectionName}/query \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "size": 2, "query": { "queryString": { "query": "example-field1:example-value" } } }'
{ "took": 10, "maxScore": 1, "total": 2, "docs": [ { "collection": "example-collection-name", "score": 1, "doc": { "example-field1": "example-value1", "example-field2": [ 0.1, 0.2, 0.3 ] } }, { "collection": "example-collection-name", "score": 0.9, "doc": { "example-field1": "example-value2", "example-field2": [ 0.4, 0.5, 0.6 ] } } ] }
Search a collection with a query and return the most similar documents.
Project API Key.
Collection name.
Documents selected by query.
The response is of type object.
object
Was this page helpful?