KernelSearchResults<T> Class

  • java.lang.Object
    • com.microsoft.semantickernel.data.textsearch.KernelSearchResults<T>

Type Parameters

T

The type of the search results.

public class KernelSearchResults<T>

The search results.

Constructor Summary

Constructor Description
KernelSearchResults(List<T> results)

Creates a new instance of the KernelSearchResults class.

KernelSearchResults(List<T> results, long totalCount, Map<String,Object> metadata)

Creates a new instance of the KernelSearchResults class.

Method Summary

Modifier and Type Method and Description
java.util.Map<java.lang.String,java.lang.Object> getMetadata()

Gets the metadata associated with the search results.

java.util.List<T> getResults()

Gets the search results.

long getTotalCount()

Gets the total count of 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

KernelSearchResults

public KernelSearchResults(List results)

Creates a new instance of the KernelSearchResults class.

Parameters:

results - The search results.

KernelSearchResults

public KernelSearchResults(List results, long totalCount, Map metadata)

Creates a new instance of the KernelSearchResults class.

Parameters:

results - The search results.
totalCount - The total count of search results.
metadata - The metadata.

Method Details

getMetadata

public Map getMetadata()

Gets the metadata associated with the search results.

Returns:

The metadata.

getResults

public List getResults()

Gets the search results.

Returns:

The search results.

getTotalCount

public long getTotalCount()

Gets the total count of search results. This value represents the total number of results that are available for the current query and not the number of results being returned.

Returns:

The total count of search results.

Applies to