You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/development/vector_stores.md
+81-3Lines changed: 81 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ In Flink Agents, vector stores are essential for:
41
41
42
42
### Concepts
43
43
***Document**: Document is the abstraction that represents a piece of text and associated metadata. A document may also carry a pre-computed `embedding` vector and a `score` populated by query results.
44
+
***Collection**: Collection is the abstraction that represents a set of documents. It corresponds to different concept for different vector store specification, like index in Elasticsearch/OpenSearch and collection in Chroma/Milvus.
44
45
***Filter DSL**: A unified, equality-only metadata filter dialect shared by `query`, `get`, and `delete`. The DSL covers only the subset every supported backend can honour (equality matching), so callers don't need to know each store's native operators. See the [Filter DSL](#filter-dsl) section below for details.
45
46
46
47
## How to use
@@ -172,7 +173,7 @@ For vector stores that implement `CollectionManageableVectorStore`, you can crea
172
173
*`delete_collection` / `deleteCollection`: Delete a collection by name.
173
174
174
175
{{< hint info >}}
175
-
Collection-level operations are only supported for vector stores that implement `CollectionManageableVectorStore`. Among the built-in providers, Chroma (Python), Elasticsearch (Java)and OpenSearch (Java) implement this interface.
176
+
Collection-level operations are only supported for vector stores that implement `CollectionManageableVectorStore`. Among the built-in providers, Chroma (Python), Elasticsearch (Java), OpenSearch (Java), and Milvus (Java) implement this interface.
176
177
{{< /hint >}}
177
178
178
179
{{< tabs "Collection level operations" >}}
@@ -642,9 +643,86 @@ public static ResourceDescriptor vectorStore() {
642
643
643
644
{{< /tabs >}}
644
645
646
+
### Milvus
647
+
648
+
[Milvus](https://milvus.io/) is an open-source vector database designed for high-dimensional vector search at scale.
649
+
650
+
{{< hint info >}}
651
+
Milvus is currently supported in the Java API only. To use Milvus from Python agents, see [Using Cross-Language Providers](#using-cross-language-providers).
|`host`| str |`"localhost"`| Milvus host used when `uri` is not set |
684
+
|`port`| int |`19530`| Milvus port used when `uri` is not set |
685
+
|`db_name`| str | None | Milvus database name |
686
+
|`token`| str | None | Token for Milvus authentication |
687
+
|`username`| str | None | Username for basic authentication |
688
+
|`password`| str | None | Password for basic authentication |
689
+
|`enable_precheck`| bool |`false`| Whether to enable Milvus client precheck |
690
+
691
+
{{< hint info >}}
692
+
When creating a collection, MilvusVectorStore creates a primary-key field, content field, JSON metadata field, vector field, vector index, and JSON metadata indexes. The default metadata JSON path indexes cover common filter keys such as `user_id`, `agent_id`, `run_id`, `actor_id`, and `category`; add `metadata_index_keys` for application-specific filter keys.
693
+
694
+
The default shard count is `1`. As a rough capacity-planning rule, use about one shard per 100 million vectors, and increase it for heavier write throughput.
Flink Agents supports cross-language vector store integration, allowing you to use vector stores implemented in one language (Java or Python) from agents written in the other language. This is particularly useful when a vector store provider is only available in one language (e.g., Elasticsearch is currently Java-only, Chroma is currently Python-only).
725
+
Flink Agents supports cross-language vector store integration, allowing you to use vector stores implemented in one language (Java or Python) from agents written in the other language. This is particularly useful when a vector store provider is only available in one language (e.g., Elasticsearch and Milvus are currently Java-only, Chroma is currently Python-only).
648
726
649
727
{{< hint warning >}}
650
728
**Limitations:**
@@ -1101,4 +1179,4 @@ public class MyVectorStore extends BaseVectorStore
@@ -131,4 +132,4 @@ Flink Agents provides built-in integrations for many ecosystem providers. Some i
131
132
To avoid potential conflict with Flink cluster, the scope of the dependencies related to Flink and Flink Agents for agent job are provided. See [Maven Dependencies]({{< ref "docs/get-started/installation#maven-dependencies-for-java" >}}) for details.
132
133
133
134
To run the examples in IDE, users must enable the IDE feature: `add dependencies with provided scope to classpath`.
134
-
* For **IDEA**, edit the **`Run/Debug Configuration`** and enable **`add dependencies with provided scope to classpath`**. See [Run/Debug Configuration](https://www.jetbrains.com/help/idea/run-debug-configuration-scala.html) for details.
135
+
* For **IDEA**, edit the **`Run/Debug Configuration`** and enable **`add dependencies with provided scope to classpath`**. See [Run/Debug Configuration](https://www.jetbrains.com/help/idea/run-debug-configuration-scala.html) for details.
Copy file name to clipboardExpand all lines: e2e-test/flink-agents-end-to-end-tests-resource-cross-language/src/test/java/org/apache/flink/agents/resource/test/VectorStoreCrossLanguageAgent.java
0 commit comments