I am trying to get atlas to work and I haven’t done it before. Basically I am trying to tokenize and store a json document. I can see the text in the docs but they aren’t getting pulled up and I get 0 documents returned the aggregation looks like this
o.s.data.mongodb.core.MongoTemplate : Executing aggregation: [{ "$vectorSearch" : { "queryVector" : [...], "path" : "embedding", "numCandidates" : 200, "index" : "vector_index", "limit" : 4}}, { "$addFields" : { "score" : { "$meta" : "vectorSearchScore"}}}, { "$match" : { "score" : { "$gte" : 0.0}}}] in collection vector_store
and I created a script like this…
`
print("Connected to database: " + db.getName());
print("Collections in this database: " + JSON.stringify(db.getCollectionNames()));
var count = db.vector_store.countDocuments();
print("Document count in vector_store: " + count);
try {
var first = db.vector_store.findOne();
print("First document in vector_store: " + first.content);
} catch (ex) {
print("An error occurred: " + ex);
} finally {
print(“Count operation completed”);
}
And I can see there is a document with door in its content...
`
Connected to database: wiki
Collections in this database: ["vector_store"]
Document count in vector_store: 12295
First document in vector_store: rooms.Back_Door_Lock.devices.119.type: 119
`
So why can't it find the doc with the aggregation?
I have a StackOverflow with more information here https://stackoverflow.com/questions/79106363/why-are-the-docs-not-being-found-in-spring-ai-vector-store-when-they-exist-in-mo
It is probably something easy as I am a newbie but any help is super appreciated.