Menu
Search with a vector
Search with a vector
POST
/queryUse it in a workflow
- Add a step and choose the Pinecone connector.
- Pick the Search with a vector action (under Data).
- Fill in the fields below, then reference the result from later steps as
{{searchWithAVector.response.data}}.
Request
Request body
Enter the body as JSON in the step's Body field.
{
"topK": 10,
"namespace": "example-namespace",
"filter": {
"genre": {
"$in": [
"comedy",
"documentary",
"drama"
]
},
"year": {
"$eq": 2019
}
},
"includeValues": true,
"includeMetadata": true,
"vector": [
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8
],
"sparseVector": {
"indices": [
1,
312,
822,
14,
980
],
"values": [
0.1,
0.2,
0.3,
0.4,
0.5
]
},
"id": "example-vector-1",
"scanFactor": 2,
"maxCandidates": 1000
}
Response
Returns 200 with an object. Read it in later steps with {{searchWithAVector.response.data.<field>}}.
{
"results": [
{
"matches": [
{
"id": "example-vector-1",
"score": 0.08,
"values": [
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8
],
"sparseValues": {
"indices": [
1,
312,
822,
14,
980
],
"values": [
0.1,
0.2,
0.3,
0.4,
0.5
]
},
"metadata": {
"genre": "documentary",
"year": 2019
}
}
],
"namespace": "example-namespace"
}
],
"matches": [
{
"id": "example-vector-1",
"score": 0.08,
"values": [
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8
],
"sparseValues": {
"indices": [
1,
312,
822,
14,
980
],
"values": [
0.1,
0.2,
0.3,
0.4,
0.5
]
},
"metadata": {
"genre": "documentary",
"year": 2019
}
}
],
"namespace": "string",
"usage": {
"readUnits": 5,
"egressBytes": 1024
}
}
Need more? See the Pinecone guide for connection setup and behaviour shared by every action.
Was this page helpful?