@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class KnowledgeBaseVectorSearchConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
Configurations for how to perform the search query and return results. For more information, see Query configurations.
This data type is used in the following API operations:
Retrieve request – in the vectorSearchConfiguration
field
RetrieveAndGenerate request – in the vectorSearchConfiguration
field
Constructor and Description |
---|
KnowledgeBaseVectorSearchConfiguration() |
Modifier and Type | Method and Description |
---|---|
KnowledgeBaseVectorSearchConfiguration |
clone() |
boolean |
equals(Object obj) |
RetrievalFilter |
getFilter()
Specifies the filters to use on the metadata in the knowledge base data sources before returning results.
|
Integer |
getNumberOfResults()
The number of source chunks to retrieve.
|
String |
getOverrideSearchType()
By default, Amazon Bedrock decides a search strategy for you.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setFilter(RetrievalFilter filter)
Specifies the filters to use on the metadata in the knowledge base data sources before returning results.
|
void |
setNumberOfResults(Integer numberOfResults)
The number of source chunks to retrieve.
|
void |
setOverrideSearchType(String overrideSearchType)
By default, Amazon Bedrock decides a search strategy for you.
|
String |
toString()
Returns a string representation of this object.
|
KnowledgeBaseVectorSearchConfiguration |
withFilter(RetrievalFilter filter)
Specifies the filters to use on the metadata in the knowledge base data sources before returning results.
|
KnowledgeBaseVectorSearchConfiguration |
withNumberOfResults(Integer numberOfResults)
The number of source chunks to retrieve.
|
KnowledgeBaseVectorSearchConfiguration |
withOverrideSearchType(SearchType overrideSearchType)
By default, Amazon Bedrock decides a search strategy for you.
|
KnowledgeBaseVectorSearchConfiguration |
withOverrideSearchType(String overrideSearchType)
By default, Amazon Bedrock decides a search strategy for you.
|
public KnowledgeBaseVectorSearchConfiguration()
public void setFilter(RetrievalFilter filter)
Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
filter
- Specifies the filters to use on the metadata in the knowledge base data sources before returning results.
For more information, see Query configurations.public RetrievalFilter getFilter()
Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
public KnowledgeBaseVectorSearchConfiguration withFilter(RetrievalFilter filter)
Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
filter
- Specifies the filters to use on the metadata in the knowledge base data sources before returning results.
For more information, see Query configurations.public void setNumberOfResults(Integer numberOfResults)
The number of source chunks to retrieve.
numberOfResults
- The number of source chunks to retrieve.public Integer getNumberOfResults()
The number of source chunks to retrieve.
public KnowledgeBaseVectorSearchConfiguration withNumberOfResults(Integer numberOfResults)
The number of source chunks to retrieve.
numberOfResults
- The number of source chunks to retrieve.public void setOverrideSearchType(String overrideSearchType)
By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless
vector store that contains a filterable text field, you can specify whether to query the knowledge base with a
HYBRID
search using both vector embeddings and raw text, or SEMANTIC
search using only
vector embeddings. For other vector store configurations, only SEMANTIC
search is available. For
more information, see Test a knowledge base.
overrideSearchType
- By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch
Serverless vector store that contains a filterable text field, you can specify whether to query the
knowledge base with a HYBRID
search using both vector embeddings and raw text, or
SEMANTIC
search using only vector embeddings. For other vector store configurations, only
SEMANTIC
search is available. For more information, see Test a knowledge
base.SearchType
public String getOverrideSearchType()
By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless
vector store that contains a filterable text field, you can specify whether to query the knowledge base with a
HYBRID
search using both vector embeddings and raw text, or SEMANTIC
search using only
vector embeddings. For other vector store configurations, only SEMANTIC
search is available. For
more information, see Test a knowledge base.
HYBRID
search using both vector embeddings and raw text, or
SEMANTIC
search using only vector embeddings. For other vector store configurations, only
SEMANTIC
search is available. For more information, see Test a knowledge
base.SearchType
public KnowledgeBaseVectorSearchConfiguration withOverrideSearchType(String overrideSearchType)
By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless
vector store that contains a filterable text field, you can specify whether to query the knowledge base with a
HYBRID
search using both vector embeddings and raw text, or SEMANTIC
search using only
vector embeddings. For other vector store configurations, only SEMANTIC
search is available. For
more information, see Test a knowledge base.
overrideSearchType
- By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch
Serverless vector store that contains a filterable text field, you can specify whether to query the
knowledge base with a HYBRID
search using both vector embeddings and raw text, or
SEMANTIC
search using only vector embeddings. For other vector store configurations, only
SEMANTIC
search is available. For more information, see Test a knowledge
base.SearchType
public KnowledgeBaseVectorSearchConfiguration withOverrideSearchType(SearchType overrideSearchType)
By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless
vector store that contains a filterable text field, you can specify whether to query the knowledge base with a
HYBRID
search using both vector embeddings and raw text, or SEMANTIC
search using only
vector embeddings. For other vector store configurations, only SEMANTIC
search is available. For
more information, see Test a knowledge base.
overrideSearchType
- By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch
Serverless vector store that contains a filterable text field, you can specify whether to query the
knowledge base with a HYBRID
search using both vector embeddings and raw text, or
SEMANTIC
search using only vector embeddings. For other vector store configurations, only
SEMANTIC
search is available. For more information, see Test a knowledge
base.SearchType
public String toString()
toString
in class Object
Object.toString()
public KnowledgeBaseVectorSearchConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.