From ebe30acba210889305f055606ce830e60cb9d3bc Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Wed, 8 Jan 2025 16:16:12 -0500 Subject: [PATCH] Remove deprecations in Coherence and Qdrant vector stores --- .../coherence/CoherenceVectorStore.java | 52 ------------------- .../vectorstore/qdrant/QdrantVectorStore.java | 38 -------------- 2 files changed, 90 deletions(-) diff --git a/vector-stores/spring-ai-coherence-store/src/main/java/org/springframework/ai/vectorstore/coherence/CoherenceVectorStore.java b/vector-stores/spring-ai-coherence-store/src/main/java/org/springframework/ai/vectorstore/coherence/CoherenceVectorStore.java index c5e109fd8..928425299 100644 --- a/vector-stores/spring-ai-coherence-store/src/main/java/org/springframework/ai/vectorstore/coherence/CoherenceVectorStore.java +++ b/vector-stores/spring-ai-coherence-store/src/main/java/org/springframework/ai/vectorstore/coherence/CoherenceVectorStore.java @@ -139,18 +139,6 @@ public class CoherenceVectorStore extends AbstractObservationVectorStore impleme private IndexType indexType; - /** - * Creates a new CoherenceVectorStore with minimal configuration. - * @param embeddingModel the embedding model to use - * @param session the Coherence session - * @deprecated Since 1.0.0-M5, use {@link #builder(Session, EmbeddingModel)} ()} - * instead - */ - @Deprecated(since = "1.0.0-M5", forRemoval = true) - public CoherenceVectorStore(EmbeddingModel embeddingModel, Session session) { - this(builder(session, embeddingModel)); - } - /** * Protected constructor that accepts a builder instance. This is the preferred way to * create new CoherenceVectorStore instances. @@ -177,46 +165,6 @@ public class CoherenceVectorStore extends AbstractObservationVectorStore impleme return new Builder(session, embeddingModel); } - /** - * @deprecated Since 1.0.0-M5, use {@link #builder(Session, EmbeddingModel)} ()} - * instead - */ - @Deprecated(since = "1.0.0-M5", forRemoval = true) - public CoherenceVectorStore setMapName(String mapName) { - this.mapName = mapName; - return this; - } - - /** - * @deprecated Since 1.0.0-M5, use {@link #builder(Session, EmbeddingModel)} ()} - * instead - */ - @Deprecated(since = "1.0.0-M5", forRemoval = true) - public CoherenceVectorStore setDistanceType(DistanceType distanceType) { - this.distanceType = distanceType; - return this; - } - - /** - * @deprecated Since 1.0.0-M5, use {@link #builder(Session, EmbeddingModel)} ()} - * instead - */ - @Deprecated(since = "1.0.0-M5", forRemoval = true) - public CoherenceVectorStore setIndexType(IndexType indexType) { - this.indexType = indexType; - return this; - } - - /** - * @deprecated Since 1.0.0-M5, use {@link #builder(Session, EmbeddingModel)} ()} - * instead - */ - @Deprecated(since = "1.0.0-M5", forRemoval = true) - public CoherenceVectorStore setForcedNormalization(boolean forcedNormalization) { - this.forcedNormalization = forcedNormalization; - return this; - } - @Override public void doAdd(final List documents) { Map chunks = new HashMap<>((int) Math.ceil(documents.size() / 0.75f)); diff --git a/vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantVectorStore.java b/vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantVectorStore.java index 4ec1671b6..7f549096e 100644 --- a/vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantVectorStore.java +++ b/vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantVectorStore.java @@ -22,7 +22,6 @@ import java.util.Optional; import java.util.UUID; import java.util.concurrent.ExecutionException; -import io.micrometer.observation.ObservationRegistry; import io.qdrant.client.QdrantClient; import io.qdrant.client.grpc.Collections.Distance; import io.qdrant.client.grpc.Collections.VectorParams; @@ -142,43 +141,6 @@ public class QdrantVectorStore extends AbstractObservationVectorStore implements private final BatchingStrategy batchingStrategy; - /** - * Constructs a new QdrantVectorStore. - * @param qdrantClient A {@link QdrantClient} instance for interfacing with Qdrant. - * @param collectionName The name of the collection to use in Qdrant. - * @param embeddingModel The client for embedding operations. - * @param initializeSchema A boolean indicating whether to initialize the schema. - * @deprecated Use {@link #builder(QdrantClient, EmbeddingModel)} - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public QdrantVectorStore(QdrantClient qdrantClient, String collectionName, EmbeddingModel embeddingModel, - boolean initializeSchema) { - this(qdrantClient, collectionName, embeddingModel, initializeSchema, ObservationRegistry.NOOP, null, - new TokenCountBatchingStrategy()); - } - - /** - * Constructs a new QdrantVectorStore. - * @param qdrantClient A {@link QdrantClient} instance for interfacing with Qdrant. - * @param collectionName The name of the collection to use in Qdrant. - * @param embeddingModel The client for embedding operations. - * @param initializeSchema A boolean indicating whether to initialize the schema. - * @param observationRegistry The observation registry to use. - * @param customObservationConvention The custom search observation convention to use. - * @deprecated Use {@link #builder(QdrantClient, EmbeddingModel)} - */ - @Deprecated(forRemoval = true, since = "1.0.0-M5") - public QdrantVectorStore(QdrantClient qdrantClient, String collectionName, EmbeddingModel embeddingModel, - boolean initializeSchema, ObservationRegistry observationRegistry, - VectorStoreObservationConvention customObservationConvention, BatchingStrategy batchingStrategy) { - - this(builder(qdrantClient, embeddingModel).collectionName(collectionName) - .initializeSchema(initializeSchema) - .observationRegistry(observationRegistry) - .customObservationConvention(customObservationConvention) - .batchingStrategy(batchingStrategy)); - } - /** * Protected constructor for creating a QdrantVectorStore instance using the builder * pattern.