Class VectorStoreTextSearch<Record>
- java.lang.Object
-
- com.microsoft.semantickernel.data.VectorStoreTextSearch<Record>
-
- Type Parameters:
Record- The record type.
- All Implemented Interfaces:
TextSearch
public class VectorStoreTextSearch<Record> extends Object implements TextSearch
A text search implementation that uses a vector record collection to perform the search.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVectorStoreTextSearch.Builder<Record>A builder for theVectorStoreTextSearchclass.
-
Constructor Summary
Constructors Constructor Description VectorStoreTextSearch(VectorizedSearch<Record> vectorizedSearch, TextEmbeddingGenerationService textEmbeddingGenerationService, TextSearchStringMapper stringMapper, TextSearchResultMapper resultMapper, VectorStoreTextSearchOptions options)Create a new instance of VectorStoreTextSearch withVectorizedSearchto perform vectorized search andTextEmbeddingGenerationServiceto generate text embeddings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <Record> VectorStoreTextSearch.Builder<Record>builder()Create a new instance ofVectorStoreTextSearch.Builder.reactor.core.publisher.Mono<KernelSearchResults<Object>>getSearchResultsAsync(String query, TextSearchOptions options)Perform a search for content related to the specified query and return Object values representing the search results.reactor.core.publisher.Mono<KernelSearchResults<TextSearchResult>>getTextSearchResultsAsync(String query, TextSearchOptions options)Perform a search for content related to the specified query and return TextSearchResult values representing the search results.reactor.core.publisher.Mono<KernelSearchResults<String>>searchAsync(String query, TextSearchOptions options)Perform a search for content related to the specified query and return String values representing the search results.
-
-
-
Constructor Detail
-
VectorStoreTextSearch
public VectorStoreTextSearch(@Nonnull VectorizedSearch<Record> vectorizedSearch, @Nonnull TextEmbeddingGenerationService textEmbeddingGenerationService, @Nullable TextSearchStringMapper stringMapper, @Nullable TextSearchResultMapper resultMapper, @Nullable VectorStoreTextSearchOptions options)
Create a new instance of VectorStoreTextSearch withVectorizedSearchto perform vectorized search andTextEmbeddingGenerationServiceto generate text embeddings.- Parameters:
vectorizedSearch- The vectorized search. Usually a vector record collection.textEmbeddingGenerationService- The text embedding generation service.stringMapper- The string mapper.resultMapper- The result mapper.options- The options.
-
-
Method Detail
-
searchAsync
public reactor.core.publisher.Mono<KernelSearchResults<String>> searchAsync(String query, TextSearchOptions options)
Perform a search for content related to the specified query and return String values representing the search results.- Specified by:
searchAsyncin interfaceTextSearch- Parameters:
query- The text to search for.options- The search options.- Returns:
- The search results.
-
getTextSearchResultsAsync
public reactor.core.publisher.Mono<KernelSearchResults<TextSearchResult>> getTextSearchResultsAsync(String query, TextSearchOptions options)
Perform a search for content related to the specified query and return TextSearchResult values representing the search results.- Specified by:
getTextSearchResultsAsyncin interfaceTextSearch- Parameters:
query- The text to search for.options- The search options.- Returns:
- The search results.
-
getSearchResultsAsync
public reactor.core.publisher.Mono<KernelSearchResults<Object>> getSearchResultsAsync(String query, TextSearchOptions options)
Perform a search for content related to the specified query and return Object values representing the search results.- Specified by:
getSearchResultsAsyncin interfaceTextSearch- Parameters:
query- The text to search for.options- The search options.- Returns:
- The search results.
-
builder
public static <Record> VectorStoreTextSearch.Builder<Record> builder()
Create a new instance ofVectorStoreTextSearch.Builder.- Type Parameters:
Record- The record type.- Returns:
- The builder.
-
-