主题
访问原生客户端
Coherence 向量库实现通过 getNativeClient() 方法提供对底层原生 Coherence 客户端(Session)的访问:
java
CoherenceVectorStore vectorStore = context.getBean(CoherenceVectorStore.class);
Optional<Session> nativeClient = vectorStore.getNativeClient();
if (nativeClient.isPresent()) {
Session session = nativeClient.get();
// Use the native client for Coherence-specific operations
}原生客户端让你得以访问那些可能未通过 VectorStore 接口暴露的 Coherence 特定功能与操作。