Class OracleEmbeddingStore.Builder
java.lang.Object
dev.langchain4j.store.embedding.oracle.OracleEmbeddingStore.Builder
- Enclosing class:
OracleEmbeddingStore
Builder which configures and creates instances of
OracleEmbeddingStore
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an embedding store with the configuration applied to this builder.dataSource
(DataSource dataSource) Configures a data source that connects to an Oracle Database.embeddingTable
(EmbeddingTable embeddingTable) Configures a table used to store embeddings, text, and metadata.embeddingTable
(String tableName) Configures the name of a table used to store embeddings, text, and metadata.embeddingTable
(String tableName, CreateOption createOption) Configures the name of table used to store embeddings, text, and metadata.exactSearch
(boolean isExactSearch) Configures the embedding store to use exact or approximate similarity search.vectorIndex
(CreateOption createOption) Configures the creation of an index on the embedding column of theEmbeddingTable
used by the embedding store.
-
Method Details
-
dataSource
Configures a data source that connects to an Oracle Database.- Parameters:
dataSource
- Data source to configure. Not null.- Returns:
- This builder. Not null.
- Throws:
IllegalArgumentException
- If the dataSource is null.
-
embeddingTable
Configures the name of a table used to store embeddings, text, and metadata. The table must already exist and have the default column names.- Parameters:
tableName
- The name of an existing table. Not null.- Returns:
- The named embedding table. Not null;
- Throws:
IllegalArgumentException
- If the tableName is null.
-
embeddingTable
Configures the name of table used to store embeddings, text, and metadata. Depending on which CreateOption is provided, a table with the default column names may be created whenbuild()
is called.- Parameters:
tableName
- The name of an existing table. Not null.createOption
- Option for creating the table. Not null.- Returns:
- This builder. Not null.
- Throws:
IllegalArgumentException
- If the tableName or createOption is null.
-
embeddingTable
Configures a table used to store embeddings, text, and metadata. Depending on which CreateOption the table isconfigured
with, it may be created whenbuild()
is called.- Parameters:
embeddingTable
- The table used to store embeddings. Not null.- Returns:
- This builder. Not null.
- Throws:
IllegalArgumentException
- If the embeddingTable is null.
-
vectorIndex
Configures the creation of an index on the embedding column of theEmbeddingTable
used by the embedding store. Depending on which CreateOption is provided, an index may be created whenbuild()
is called. The default createOption isCreateOption.CREATE_NONE
.- Parameters:
createOption
- Option for creating the index. Not null.- Returns:
- This builder. Not null.
-
exactSearch
Configures the embedding store to use exact or approximate similarity search. Approximate search is the default.- Parameters:
isExactSearch
-true
to configure exact search, orfalse
for approximate.- Returns:
- This builder. Not null.
-
build
Builds an embedding store with the configuration applied to this builder.- Returns:
- A new embedding store. Not null.
- Throws:
RuntimeException
- If connection to the database fails, or an error occurs when creating the schema objects.
-