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.Builder
aggregation(String aggregation)
Set the aggregation.QueryOptions.Builder
bias(String bias)
Set the bias.QueryOptions
build()
Builds a QueryOptions.QueryOptions.Builder
collectionId(String collectionId)
Set the collectionId.QueryOptions.Builder
count(long count)
Set the count.QueryOptions.Builder
deduplicate(Boolean deduplicate)
Set the deduplicate.QueryOptions.Builder
deduplicateField(String deduplicateField)
Set the deduplicateField.QueryOptions.Builder
environmentId(String environmentId)
Set the environmentId.QueryOptions.Builder
filter(String filter)
Set the filter.QueryOptions.Builder
highlight(Boolean highlight)
Set the highlight.QueryOptions.Builder
naturalLanguageQuery(String naturalLanguageQuery)
Set the naturalLanguageQuery.QueryOptions.Builder
offset(long offset)
Set the offset.QueryOptions.Builder
passages(Boolean passages)
Set the passages.QueryOptions.Builder
passagesCharacters(long passagesCharacters)
Set the passagesCharacters.QueryOptions.Builder
passagesCount(long passagesCount)
Set the passagesCount.QueryOptions.Builder
passagesFields(String passagesFields)
Set the passagesFields.QueryOptions.Builder
query(String query)
Set the query.QueryOptions.Builder
similar(Boolean similar)
Set the similar.QueryOptions.Builder
similarDocumentIds(String similarDocumentIds)
Set the similarDocumentIds.QueryOptions.Builder
similarFields(String similarFields)
Set the similarFields.QueryOptions.Builder
sort(String sort)
Set the sort.QueryOptions.Builder
spellingSuggestions(Boolean spellingSuggestions)
Set the spellingSuggestions.QueryOptions.Builder
xReturn(String xReturn)
Set the xReturn.QueryOptions.Builder
xWatsonLoggingOptOut(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
-