Class EmbeddingSearchRequest.EmbeddingSearchRequestBuilder
java.lang.Object
dev.langchain4j.store.embedding.EmbeddingSearchRequest.EmbeddingSearchRequestBuilder
- Enclosing class:
EmbeddingSearchRequest
-
Method Summary
Modifier and TypeMethodDescriptionbuild()The filter to be applied to theMetadataduring search.maxResults(Integer maxResults) The maximum number of embeddings to return.The minimum score, ranging from 0 to 1 (inclusive).The query used for search.queryEmbedding(Embedding queryEmbedding) The embedding used as a reference.
-
Method Details
-
query
The query used for search. This is an optional parameter that can be used byEmbeddingStoreimplementations to support hybrid search. -
queryEmbedding
public EmbeddingSearchRequest.EmbeddingSearchRequestBuilder queryEmbedding(Embedding queryEmbedding) The embedding used as a reference. Found embeddings should be similar to this one. This is a mandatory parameter. -
maxResults
The maximum number of embeddings to return. This is an optional parameter. Default: 3 -
minScore
The minimum score, ranging from 0 to 1 (inclusive). Only embeddings with a score >= minScore will be returned. This is an optional parameter. Default: 0 -
filter
The filter to be applied to theMetadataduring search. OnlyTextSegments whoseMetadatamatches theFilterwill be returned. Please note that not allEmbeddingStores support this feature yet. This is an optional parameter. Default: no filtering -
build
-