Class QueryOptions.Builder
java.lang.Object
com.ibm.watson.discovery.v1.model.QueryOptions.Builder
- Enclosing class:
- QueryOptions
public static class QueryOptions.Builder extends Object
Builder.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description QueryOptions.Builderaggregation(String aggregation)Set the aggregation.QueryOptions.Builderbias(String bias)Set the bias.QueryOptionsbuild()Builds a QueryOptions.QueryOptions.BuildercollectionId(String collectionId)Set the collectionId.QueryOptions.Buildercount(long count)Set the count.QueryOptions.Builderdeduplicate(Boolean deduplicate)Set the deduplicate.QueryOptions.BuilderdeduplicateField(String deduplicateField)Set the deduplicateField.QueryOptions.BuilderenvironmentId(String environmentId)Set the environmentId.QueryOptions.Builderfilter(String filter)Set the filter.QueryOptions.Builderhighlight(Boolean highlight)Set the highlight.QueryOptions.BuildernaturalLanguageQuery(String naturalLanguageQuery)Set the naturalLanguageQuery.QueryOptions.Builderoffset(long offset)Set the offset.QueryOptions.Builderpassages(Boolean passages)Set the passages.QueryOptions.BuilderpassagesCharacters(long passagesCharacters)Set the passagesCharacters.QueryOptions.BuilderpassagesCount(long passagesCount)Set the passagesCount.QueryOptions.BuilderpassagesFields(String passagesFields)Set the passagesFields.QueryOptions.Builderquery(String query)Set the query.QueryOptions.Buildersimilar(Boolean similar)Set the similar.QueryOptions.BuildersimilarDocumentIds(String similarDocumentIds)Set the similarDocumentIds.QueryOptions.BuildersimilarFields(String similarFields)Set the similarFields.QueryOptions.Buildersort(String sort)Set the sort.QueryOptions.BuilderspellingSuggestions(Boolean spellingSuggestions)Set the spellingSuggestions.QueryOptions.BuilderxReturn(String xReturn)Set the xReturn.QueryOptions.BuilderxWatsonLoggingOptOut(Boolean xWatsonLoggingOptOut)Set the xWatsonLoggingOptOut.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
environmentId- the environmentIdcollectionId- the collectionId
-
-
Method Details
-
build
Builds a QueryOptions.- Returns:
- the new QueryOptions instance
-
environmentId
Set the environmentId.- Parameters:
environmentId- the environmentId- Returns:
- the QueryOptions builder
-
collectionId
Set the collectionId.- Parameters:
collectionId- the collectionId- Returns:
- the QueryOptions builder
-
filter
Set the filter.- Parameters:
filter- the filter- Returns:
- the QueryOptions builder
-
query
Set the query.- Parameters:
query- the query- Returns:
- the QueryOptions builder
-
naturalLanguageQuery
Set the naturalLanguageQuery.- Parameters:
naturalLanguageQuery- the naturalLanguageQuery- Returns:
- the QueryOptions builder
-
passages
Set the passages.- Parameters:
passages- the passages- Returns:
- the QueryOptions builder
-
aggregation
Set the aggregation.- Parameters:
aggregation- the aggregation- Returns:
- the QueryOptions builder
-
count
Set the count.- Parameters:
count- the count- Returns:
- the QueryOptions builder
-
xReturn
Set the xReturn.- Parameters:
xReturn- the xReturn- Returns:
- the QueryOptions builder
-
offset
Set the offset.- Parameters:
offset- the offset- Returns:
- the QueryOptions builder
-
sort
Set the sort.- Parameters:
sort- the sort- Returns:
- the QueryOptions builder
-
highlight
Set the highlight.- Parameters:
highlight- the highlight- Returns:
- the QueryOptions builder
-
passagesFields
Set the passagesFields.- Parameters:
passagesFields- the passagesFields- Returns:
- the QueryOptions builder
-
passagesCount
Set the passagesCount.- Parameters:
passagesCount- the passagesCount- Returns:
- the QueryOptions builder
-
passagesCharacters
Set the passagesCharacters.- Parameters:
passagesCharacters- the passagesCharacters- Returns:
- the QueryOptions builder
-
deduplicate
Set the deduplicate.- Parameters:
deduplicate- the deduplicate- Returns:
- the QueryOptions builder
-
deduplicateField
Set the deduplicateField.- Parameters:
deduplicateField- the deduplicateField- Returns:
- the QueryOptions builder
-
similar
Set the similar.- Parameters:
similar- the similar- Returns:
- the QueryOptions builder
-
similarDocumentIds
Set the similarDocumentIds.- Parameters:
similarDocumentIds- the similarDocumentIds- Returns:
- the QueryOptions builder
-
similarFields
Set the similarFields.- Parameters:
similarFields- the similarFields- Returns:
- the QueryOptions builder
-
bias
Set the bias.- Parameters:
bias- the bias- Returns:
- the QueryOptions builder
-
spellingSuggestions
Set the spellingSuggestions.- Parameters:
spellingSuggestions- the spellingSuggestions- Returns:
- the QueryOptions builder
-
xWatsonLoggingOptOut
Set the xWatsonLoggingOptOut.- Parameters:
xWatsonLoggingOptOut- the xWatsonLoggingOptOut- Returns:
- the QueryOptions builder
-