Fluent builder for assembling the SearchParameters used to run a vector search. Obtained from VectorSearchManager.searchParametersBuilder, populated with the search terms, paging and highlighting options, and finished with build to produce the immutable SearchParameters passed to VectorSearchManager.search.

Group: Builders


Methods

concepts(String concept)

Returns: SearchParametersBuilder

Adds one or more search terms, creating the underlying list on first use. Terms are joined together and used both for keyword matching and to generate the query's embedding vector.

ParameterDescription
conceptthe search terms to add

concepts(Collection<String> contept)

Returns: SearchParametersBuilder

Adds a collection of search terms, creating the underlying list on first use. Terms are joined together and used both for keyword matching and to generate the query's embedding vector.

ParameterDescription
conteptthe search terms to add

limit(Integer limit)

Returns: SearchParametersBuilder

Sets the maximum number of results to return. Treated as one if null or less than one.

ParameterDescription
limitthe maximum number of results

offset(Integer offset)

Returns: SearchParametersBuilder

Sets the number of leading results to skip, for paging through matches. Ignored if null or not greater than zero.

ParameterDescription
offsetthe paging offset

score(Float score)

Returns: SearchParametersBuilder

Sets the minimum relevance score a result must have to be included. Results are unrestricted by score if null.

ParameterDescription
scorethe minimum score

fragmentSize(Integer fragmentSize)

Returns: SearchParametersBuilder

Sets the maximum length, in characters, of each highlighted content fragment. Defaults to 1000 if null.

ParameterDescription
fragmentSizethe highlight fragment size

fragmentCount(Integer fragmentCount)

Returns: SearchParametersBuilder

Sets the maximum number of highlighted content fragments to return per matching document. Defaults to 3 if null.

ParameterDescription
fragmentCountthe highlight fragment count

build()

Returns: SearchParameters

Builds the immutable SearchParameters from the fields set on this builder, ready to be passed to VectorSearchManager.search.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.