Class TextSearchOptions.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.data.textsearch.TextSearchOptions.Builder
-
- Enclosing class:
- TextSearchOptions
public static class TextSearchOptions.Builder extends Object
The builder for theTextSearchOptionsclass.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextSearchOptionsbuild()Builds a new instance of theTextSearchOptionsclass.TextSearchOptions.BuilderwithFilter(TextSearchFilter filter)Sets the search filter.TextSearchOptions.BuilderwithIncludeTotalCount(boolean includeTotalCount)Sets a value indicating whether to include the total count of search results.TextSearchOptions.BuilderwithSkip(int skip)Sets the offset of the results to return.TextSearchOptions.BuilderwithTop(int top)Sets the limit of the number of results to return.
-
-
-
Method Detail
-
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.
-
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.
-
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.
-
withFilter
public TextSearchOptions.Builder withFilter(TextSearchFilter filter)
Sets the search filter.- Parameters:
filter- The search filter.- Returns:
- The builder.
-
build
public TextSearchOptions build()
Builds a new instance of theTextSearchOptionsclass.- Returns:
- A new instance of the TextSearchOptions class.
-
-