async fn add_documents(
        &self,
        docs: &[Document],
        opt: &QdrantOptions,
    ) -> Result<Vec<String>, Box<dyn Error>> {
        let embedder = opt.embedder.as_ref().unwrap_or(&self.embedder);
        let texts: Vec<String> = docs.iter().map(|d| d.page_content.clone()).collect();

        let ids = docs.iter().map(|_| Uuid::new_v4().to_string());
        let vectors = embedder.embed_documents(&texts).await?.into_iter();
        let payloads = docs.iter().map(|d| {
            let mut base = json!({
                &self.content_field: d.page_content,
                &self.metadata_field: d.metadata,
            });

            if let Some(extra_json) = opt.filters.clone() {
                if let (Value::Object(ref mut base_map), Value::Object(extra_map)) =
                    (&mut base, extra_json)
                {
                    base_map.extend(extra_map);
                }
            }

            base
        });

        let mut points: Vec<PointStruct> = Vec::with_capacity(docs.len());

        for (id, (vector, payload)) in ids.clone().zip(vectors.zip(payloads)) {
            let vector: Vec<f32> = vector.into_iter().map(|f| f as f32).collect();
            let point = PointStruct::new(id, vector, Payload::try_from(payload).unwrap());
            points.push(point);
        }

        self.client
            .upsert_points(UpsertPointsBuilder::new(&self.collection_name, points).wait(true))
            .await?;

        Ok(ids.collect())
    }
Add documents to the store.
Returns a list of document IDs added to the Qdrant collection.
src/vectorstore/qdrant/qdrant.rs