Postman Response Error

Hello All,

To date I have (In the Pinecone playground):

  1. Created an index
  2. Added data to my index
  3. Queried my data

Problem: I cannot query my data in postman. How do I resolve this?

Request URL: https://hello-world-aa80a86.svc.us-west1-gcp.pinecone.io/query ?Content-Type=application/json
Request Method: POST
Request Body
{
“vector”: [0.1, 0.1, 0.1],
“filter”: {“genre”: {“$in”: [“comedy”, “documentary”, “drama”]}},
“topK”: 1,
“includeMetadata”: true
}

I am receiving a 200 status code but in the response body it only shows “1” as shown in the picture

I have already read the docs (Query data)

I suspect the filter is causing it to return 0 results. Does the data you inserted contain those metadata fields? If not, remove the filter section and try again.

I tried removing and same thing.

In the Pinecone playground this works:
{
“topK”: 10,
“includeMetadata”: true,
“namespace”: “example_namespace”,
“queries”: [
{
“filter”: {
“colors”: {
“$eq”: “pink”
}
},
“values”: [
0.8122945324233461,
0.07425692029520642,
0.24591363802869184
]
}
]

In Postman it doesn’t

Expected result:
{
“results”: [
{
“matches”: [
{
“id”: “item_9”,
“score”: 0.855569899,
“values”: ,
“sparseValues”: {},
“metadata”: {
“category”: “sports”,
“colors”: [
“pink”,
“green”,
“blue”
],
“time_stamp”: 0.9
}
},
{
“id”: “item_7”,
“score”: 0.720533311,
“values”: ,
“sparseValues”: {},
“metadata”: {
“category”: “music”,
“colors”: [
“purple”,
“green”,
“pink”
],
“time_stamp”: 0.7
}
},
{
“id”: “item_5”,
“score”: 0.471467674,
“values”: ,
“sparseValues”: {},
“metadata”: {
“category”: “sports”,
“colors”: [
“green”,
“pink”,
“red”
],
“time_stamp”: 0.5
}
}
],
“namespace”: “example_namespace”
}
],
“matches”: ,
“namespace”: “”
}

Current Result:
1

Can you compare the curl request example when you click </> in Postman versus the curl command in the Pinecone playground/console? The below example is fake but shows the full request from my own Postman:

curl --location ‘https://squad-2a849c7.svc.us-east-1-aws.pinecone.io/query
–header ‘Api-Key: fb1b70bc-c702-4248-bb72-1fcd50f03616’
–header ‘Content-Type: application/json’
–data ‘{“queries”:[{“values”:[
-0.174141511,
-0.0848834,
0.0180412345
]}],“topK”:100,“includeMetadata”:false,“includeValues”:false}’

Try comparing that to the curl request inside the Pinecone console to see if there is a difference.

Screenshot 2023-02-21 at 2.00.23 PM

Ok will try again.

I’m literally copying what’s in the Pinecone console to postman.

The request is successful but the response body is as I’ve shown

Ensure that the URL is correct.

I put the content-type as a parameter, ensure it’s in the header