VectorStoreTextSearch<Record> Class

  • java.lang.Object
    • com.microsoft.semantickernel.data.VectorStoreTextSearch<Record>

Type Parameters

Record

The record type.

Implements

public class VectorStoreTextSearch<Record>
implements TextSearch

A text search implementation that uses a vector record collection to perform the search.

Constructor Summary

Constructor Description
VectorStoreTextSearch(VectorizedSearch<Record> vectorizedSearch, TextEmbeddingGenerationService textEmbeddingGenerationService, TextSearchStringMapper stringMapper, TextSearchResultMapper resultMapper, VectorStoreTextSearchOptions options)

Create a new instance of VectorStoreTextSearch with VectorizedSearch<Record> to perform vectorized search and TextEmbeddingGenerationService to generate text embeddings.

Method Summary

Modifier and Type Method and Description
static Builder<Record> builder()

Create a new instance of VectorStoreTextSearch.Builder<Record>.

reactor.core.publisher.Mono<KernelSearchResults<java.lang.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<java.lang.String>> searchAsync(String query, TextSearchOptions options)

Perform a search for content related to the specified query and return String values representing the search results.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

VectorStoreTextSearch

public VectorStoreTextSearch(VectorizedSearch vectorizedSearch, TextEmbeddingGenerationService textEmbeddingGenerationService, TextSearchStringMapper stringMapper, TextSearchResultMapper resultMapper, VectorStoreTextSearchOptions options)

Create a new instance of VectorStoreTextSearch with VectorizedSearch<Record> to perform vectorized search and TextEmbeddingGenerationService to 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 Details

builder

public static VectorStoreTextSearch.Builder builder()

Create a new instance of VectorStoreTextSearch.Builder<Record>.

Returns:

The builder.

getSearchResultsAsync

public Mono> getSearchResultsAsync(String query, TextSearchOptions options)

Perform a search for content related to the specified query and return Object values representing the search results.

Parameters:

query - The text to search for.
options - The search options.

Returns:

The search results.

getTextSearchResultsAsync

public Mono> getTextSearchResultsAsync(String query, TextSearchOptions options)

Perform a search for content related to the specified query and return TextSearchResult values representing the search results.

Parameters:

query - The text to search for.
options - The search options.

Returns:

The search results.

searchAsync

public Mono> searchAsync(String query, TextSearchOptions options)

Perform a search for content related to the specified query and return String values representing the search results.

Parameters:

query - The text to search for.
options - The search options.

Returns:

The search results.

Applies to