Package com.hazelcast.vector
Class SearchOptionsBuilder
java.lang.Object
com.hazelcast.vector.SearchOptionsBuilder
Vector search options builder
- Since:
- 5.5
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
CreatesSearchOptions
Adds search hint.Adds search hint.Sets search hints.Includes the user-supplied value in search results.Includes the vectors associated with each search result in search results.limit
(int limit) Sets the number of search results to return.setIncludeValue
(boolean includeValue) Includes or excludes the user-supplied value in search results.setIncludeVectors
(boolean includeVectors) Includes or excludes the vectors associated with each search result in search results.
-
Constructor Details
-
SearchOptionsBuilder
public SearchOptionsBuilder()
-
-
Method Details
-
includeValue
Includes the user-supplied value in search results.- Returns:
- this builder instance
- See Also:
-
setIncludeValue
Includes or excludes the user-supplied value in search results.- Parameters:
includeValue
-true
if search results should include the user-supplied value orfalse
if only keys should be returned- Returns:
- this builder instance
- See Also:
-
includeVectors
Includes the vectors associated with each search result in search results.- Returns:
- this builder instance
- See Also:
-
setIncludeVectors
Includes or excludes the vectors associated with each search result in search results.- Parameters:
includeVectors
-true
if search results should include the vectors associated with each search result,false
otherwise- Returns:
- this builder instance
- See Also:
-
limit
Sets the number of search results to return.- Parameters:
limit
- the number of search results to return. Must be positive.- Returns:
- this builder instance
- See Also:
-
hint
Adds search hint. Hints allow fine-tuning of the query execution.- Type Parameters:
T
- type of hint value- Parameters:
hintName
- name of the hintvalue
- value of the hint- Returns:
- this builder instance
- See Also:
-
hint
Adds search hint. Hints allow fine-tuning of the query execution.- Type Parameters:
T
- type of hint value- Parameters:
hint
- hint definitionvalue
- value of the hint- Returns:
- this builder instance
- See Also:
-
hints
Sets search hints. Hints allow fine-tuning of the query execution.- Parameters:
hints
- map of hint names and values- Returns:
- this builder instance
- See Also:
-
build
CreatesSearchOptions
- Returns:
- SearchOptions instance
-