Filters don't work for describe_index_stats

As per doc, filters should work for describe_index_stats, but they don’t:

# test in /bin/bash on Ubuntu 22.04

# create 1536 dim vectors
floats1=$(awk 'BEGIN{srand(); for(i=0;i<1536;i++) printf "%s%.2f", (i>0?",":""), rand()}')
floats2=$(awk 'BEGIN{srand(); for(i=0;i<1536;i++) printf "%s%.2f", (i>0?",":""), rand()}')

# upsert two vectors
curl --request POST \
     --url https://indexname.svc.us-west4-gcp-free.pinecone.io/vectors/upsert \
     --header 'Api-Key: XXXXX' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{ "vectors": [
       { "id": "vec1", "values": ['"$floats1"'], "metadata": { "ref_doc_id": "mydoc1" } },
       { "id": "vec2", "values": ['"$floats2"'], "metadata": { "ref_doc_id": "mydoc2" } }
]}'

# now call describe_index_stats with a filter
curl --request POST \
     --url https://indexname.svc.us-west4-gcp-free.pinecone.io/describe_index_stats \
     --header 'Api-Key: XXXXX' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{ "filter": { "ref_doc_id": "mydoc1" } }'

output totalVectorCount should be 1, but it is 2

{"namespaces":{"":{"vectorCount":2}},"dimension":1536,"indexFullness":0,"totalVectorCount":2}

How can I make it work?