Builder
public static class Builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:501–589ElasticsearchStore的构建器。位于 io.agentscope.core.rag.store 包。核心成员包括 url、indexName、dimensions、username、password、disableSslVerification。
Builder for ElasticsearchStore.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder url(String url) | 设置URL。 Sets the Elasticsearch connection URL. |
public Builder indexName(String indexName) | 设置索引名称。 Sets the index name. |
public Builder dimensions(int dimensions) | 设置向量维度。 Sets the vector dimensions. |
public Builder username(String username) | 设置该配置项。 Sets the username for authentication. |
public Builder password(String password) | 设置密码。 Sets the password for authentication. |
public Builder disableSslVerification(boolean disableSslVerification) | 禁用该配置。 Sets whether to disable SSL verification. |
public ElasticsearchStore build() throws VectorStoreException | 构建ElasticsearchStore 实例。 Builds the ElasticsearchStore instance. |
方法详情Method Detail
url
public Builder url(String url)
设置URL。
Sets the Elasticsearch connection URL.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
url | String | 服务地址(类型 `String`)。the URL |
Builder构建器。the builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:516–519indexName
public Builder indexName(String indexName)
设置索引名称。
Sets the index name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
indexName | String | 索引名称。the index name |
Builder构建器。the builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:526–529dimensions
public Builder dimensions(int dimensions)
设置向量维度。
Sets the vector dimensions.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
dimensions | int | 维度的数量。the number of dimensions |
Builder构建器。the builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:536–539username
public Builder username(String username)
设置该配置项。
Sets the username for authentication.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
username | String | username(类型 `String`)。the username |
Builder构建器。the builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:546–549password
public Builder password(String password)
设置密码。
Sets the password for authentication.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
password | String | 密码。the password |
Builder构建器。the builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:556–559disableSslVerification
public Builder disableSslVerification(boolean disableSslVerification)
禁用该配置。
Sets whether to disable SSL verification.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
disableSslVerification | boolean | 禁用 Ssl Verification(类型 `boolean`)。true to disable verification |
Builder构建器。the builder
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:567–570build
public ElasticsearchStore build() throws VectorStoreException
构建ElasticsearchStore 实例。
Builds the ElasticsearchStore instance.
ElasticsearchStore存储实例。the store instance
VectorStoreException可能抛出 `VectorStoreException`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/core/rag/store/ElasticsearchStore.java:577–588