I can see this. It works now. I checked through the versions. Had to upgrade pymongo and langchain. More importantly, I missed adding this to JSON schema:
{
"mappings": {
"dynamic": true,
"fields": {
"embedding": {
"dimensions": 1536,
"similarity": "cosine",
"type": "knnVector"
}
}
}
}
I spotted this on Langchain docs. Better u guys should make it explicit on the docs as well.
And I also think that when u create the index, llama_index should itself do the creation of search index in MongoDB. Instead of us having to do it separately. It's better to keep this logic in one place if possible. I'm just gonna do this on the side now.