xintongsong commented on code in PR #397:
URL: https://github.com/apache/flink-agents/pull/397#discussion_r2666768814


##########
docs/content/docs/development/vector_stores.md:
##########
@@ -67,26 +83,64 @@ query = VectorStoreQuery(
 )
 ```
 
-### Query Results
+{{< /tab >}}
 
-When you execute a query, you receive a `VectorStoreQueryResult` object that 
contains the search results:
+{{< tab "Java" >}}
 
-```python
-# Execute the query
-result = vector_store.query(query)
+```java
+// Create a semantic search query
+VectorStoreQuery query = new VectorStoreQuery(
+        VectorStoreQueryMode.SEMANTIC,
+        "What is Apache Flink Agents?",
+        3
+);

Review Comment:
   Unlike in python where we have keyword arguments, in java we'd better have 
some comments to help users understand the arguments, especially when the 
arguments are literals rather than variables with meaningful names.
   ```suggestion
   VectorStoreQuery query = new VectorStoreQuery(
           VectorStoreQueryMode.SEMANTIC, // mode
           "What is Apache Flink Agents?", // query text
           3 // limit
   );
   ```



##########
docs/content/docs/development/vector_stores.md:
##########
@@ -153,6 +268,10 @@ class MyAgent(Agent):
 
 #### ChromaVectorStore Parameters
 
+{{< tabs "ChromaVectorStore Parameters" >}}
+
+{{< tab "Python" >}}

Review Comment:
   We probably don't need tabs for the parameters. Even later we support Chroma 
in Java, I think the parameters should be language-independent.



##########
docs/content/docs/development/vector_stores.md:
##########
@@ -265,6 +396,74 @@ def chroma_store() -> ResourceDescriptor:
     )
 ```
 
+### Elasticsearch
+
+[Elasticsearch](https://www.elastic.co/elasticsearch/) is a distributed, 
RESTful search and analytics engine that supports vector search through dense 
vector fields and K-Nearest Neighbors (KNN).
+
+{{< hint info >}}
+Elasticsearch is currently supported in the Java API only.
+{{< /hint >}}
+
+#### Prerequisites
+
+1. An Elasticsearch cluster (version 8.0 or later for KNN support).
+2. An index with a `dense_vector` field.
+
+#### ElasticsearchVectorStore Parameters
+
+{{< tabs "ElasticsearchVectorStore Parameters" >}}
+
+{{< tab "Java" >}}

Review Comment:
   Same here for the parameter tabs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to