Skip to content

Commit

Permalink
test(mongodb): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cvauclair committed Dec 16, 2024
1 parent bf52fd9 commit f780473
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rig-mongodb/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ async fn vector_search_test() {

collection.insert_many(embeddings).await.unwrap();

// Wait for the new documents to be indexed
sleep(Duration::from_secs(30)).await;

// Create a vector index on our vector store.
// Note: a vector index called "vector_index" must exist on the MongoDB collection you are querying.
// IMPORTANT: Reuse the same model that was used to generate the embeddings
Expand All @@ -71,8 +74,6 @@ async fn vector_search_test() {
.await
.unwrap();

sleep(Duration::from_secs(30)).await;

// Query the index
let results = index
.top_n::<serde_json::Value>("What is a linglingdong?", 1)
Expand Down

0 comments on commit f780473

Please sign in to comment.