Refactor to use EmbeddedQdrantConnector directly instead of QdrantFac… #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #3: Refactor to Use EmbeddedQdrantConnector Directly
Summary
This PR simplifies our vector store implementation by using the EmbeddedQdrantConnector directly instead of going through the QdrantFactory abstraction. This change reduces complexity in our codebase while maintaining all functionality.
Changes
Removed the QdrantFactory and QdrantMode abstractions
Modified code to directly instantiate EmbeddedQdrantConnector where needed
Updated the MCP module to work with the direct connector approach
Updated tests to reflect the new implementation pattern
Added proper error handling for the simplified connection flow
Motivation
While the factory pattern provided flexibility for potentially supporting both embedded and external Qdrant instances, our analysis showed that the embedded approach is the best fit for our use case. This change:
Simplifies the codebase by removing unnecessary abstraction
Makes the code more straightforward and easier to understand
Reduces the maintenance burden by eliminating code paths that weren't being used
Maintains all functionality while reducing complexity
Testing
All existing tests have been updated and continue to pass. The MCP integration tests have been verified to work with the direct connector approach.
Related Documentation
This implementation aligns with our architectural decision to embed Qdrant within the server as outlined in the Vector Store Design document, while simplifying the implementation details.