79637750

Date: 2025-05-25 14:27:37
Score: 1
Natty:
Report link

You should add an additional index type within the vector search index JSON config.

This is my Vector Search Index that solve the issue for your reference :

{
  "fields": [
    {
      "numDimensions": 1536,
      "path": "<<path_embedding>",
      "similarity": "cosine",
      "type": "vector"
    },
    {
      "path": "question_id",    // The collection field to be used within the filter  
      "type": "filter"
    }
  ]
}

After made change and let the index rebuilt, there issue should be gone, hope this works for you, too.

Reference : https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/[Reference here ](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/)

Happy coding :)

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Alan Chan