I have the same problem. I wrote my code and name of the index in code and db the same, but I always receive only empty array in this code
loader = PyPDFLoader(“https://arxiv.org/pdf/2303.08774.pdf”)
data = loader.load()
docs = text_splitter1.split_documents(data)
vector_search_index = “vector_index”
vector_search = MongoDBAtlasVectorSearch.from_documents(
documents=docs,
embedding=OpenAIEmbeddings(disallowed_special=()),
collection=atlas_collection,
index_name=vector_search_index,
)
print("result: ", results)