def test_delete_nodes(self, node_embeddings: List[TextNode]) -> None:
        """Test deleting nodes from faiss map vector store."""
        vector_store = FaissMapVectorStore(faiss_index=get_map_index())

        # Add nodes to the faiss map vector
        vector_store.add(node_embeddings)

        query = VectorStoreQuery(
            query_embedding=text_to_embedding("baz"),
            similarity_top_k=1,
        )
        result = vector_store.query(query)
        assert result.similarities[0] == 0.0
        assert result.ids[0] == "469e9537-7bc5-4669-9ff6-baa0ed086236"

        vector_store.delete_nodes(
            node_ids=["469e9537-7bc5-4669-9ff6-baa0ed086236"],
        )

        query = VectorStoreQuery(
            query_embedding=text_to_embedding("baz"),
            similarity_top_k=1,
        )
        result = vector_store.query(query)
        print(result)
        assert result.similarities[0] == 64.0
        assert result.ids[0] == "f7d81cb3-bb42-47e6-96f5-17db6860cd11"

        assert len(vector_store._faiss_id_to_node_id_map) == 2
        assert len(vector_store._node_id_to_faiss_id_map) == 2
        assert (
            vector_store._faiss_id_to_node_id_map[0]
            == "12c70eed-5779-4008-aba0-596e003f6443"
        )
        assert (
            vector_store._faiss_id_to_node_id_map[1]
            == "f7d81cb3-bb42-47e6-96f5-17db6860cd11"
        )
        assert (
            vector_store._node_id_to_faiss_id_map[
                "12c70eed-5779-4008-aba0-596e003f6443"
            ]
            == 0
        )
        assert (
            vector_store._node_id_to_faiss_id_map[
                "f7d81cb3-bb42-47e6-96f5-17db6860cd11"
            ]
            == 1
        )
Test deleting nodes from faiss map vector store.
llama-index-integrations/vector_stores/llama-index-vector-stores-faiss/tests/test_vector_stores_faiss.py