TextSearchOptions.Builder Class

  • java.lang.Object
    • com.microsoft.semantickernel.data.textsearch.TextSearchOptions.Builder

public static class TextSearchOptions.Builder

The builder for the TextSearchOptions class.

Constructor Summary

Constructor Description
Builder()

Method Summary

Modifier and Type Method and Description
TextSearchOptions build()

Builds a new instance of the TextSearchOptions class.

Builder withFilter(TextSearchFilter filter)

Sets the search filter.

Builder withIncludeTotalCount(boolean includeTotalCount)

Sets a value indicating whether to include the total count of search results.

Builder withSkip(int skip)

Sets the offset of the results to return.

Builder withTop(int top)

Sets the limit of the number of results to return.

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

Builder

public Builder()

Method Details

build

public TextSearchOptions build()

Builds a new instance of the TextSearchOptions class.

Returns:

A new instance of the TextSearchOptions class.

withFilter

public TextSearchOptions.Builder withFilter(TextSearchFilter filter)

Sets the search filter.

Parameters:

filter - The search filter.

Returns:

The builder.

withIncludeTotalCount

public TextSearchOptions.Builder withIncludeTotalCount(boolean includeTotalCount)

Sets a value indicating whether to include the total count of search results.

Parameters:

includeTotalCount - A value indicating whether to include the total count of search results.

Returns:

The builder.

withSkip

public TextSearchOptions.Builder withSkip(int skip)

Sets the offset of the results to return.

Parameters:

skip - The offset of the results to return.

Returns:

The builder.

withTop

public TextSearchOptions.Builder withTop(int top)

Sets the limit of the number of results to return.

Parameters:

top - The limit of the number of results to return.

Returns:

The builder.

Applies to