Class QueryOptions.Builder
java.lang.Object
com.ibm.watson.discovery.v2.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
addCollectionIds(String collectionIds)
Adds an collectionIds to collectionIds.QueryOptions.Builder
addReturnField(String returnField)
Adds an returnField to xReturn.QueryOptions.Builder
aggregation(String aggregation)
Set the aggregation.QueryOptions
build()
Builds a QueryOptions.QueryOptions.Builder
collectionIds(List<String> collectionIds)
Set the collectionIds.QueryOptions.Builder
count(long count)
Set the count.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(QueryLargePassages passages)
Set the passages.QueryOptions.Builder
projectId(String projectId)
Set the projectId.QueryOptions.Builder
query(String query)
Set the query.QueryOptions.Builder
sort(String sort)
Set the sort.QueryOptions.Builder
spellingSuggestions(Boolean spellingSuggestions)
Set the spellingSuggestions.QueryOptions.Builder
suggestedRefinements(QueryLargeSuggestedRefinements suggestedRefinements)
Set the suggestedRefinements.QueryOptions.Builder
tableResults(QueryLargeTableResults tableResults)
Set the tableResults.QueryOptions.Builder
xReturn(List<String> xReturn)
Set the xReturn.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
projectId
- the projectId
-
-
Method Details
-
build
Builds a QueryOptions.- Returns:
- the new QueryOptions instance
-
addCollectionIds
Adds an collectionIds to collectionIds.- Parameters:
collectionIds
- the new collectionIds- Returns:
- the QueryOptions builder
-
addReturnField
Adds an returnField to xReturn.- Parameters:
returnField
- the new returnField- Returns:
- the QueryOptions builder
-
projectId
Set the projectId.- Parameters:
projectId
- the projectId- Returns:
- the QueryOptions builder
-
collectionIds
Set the collectionIds. Existing collectionIds will be replaced.- Parameters:
collectionIds
- the collectionIds- 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
-
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. Existing xReturn will be replaced.- 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
-
spellingSuggestions
Set the spellingSuggestions.- Parameters:
spellingSuggestions
- the spellingSuggestions- Returns:
- the QueryOptions builder
-
tableResults
Set the tableResults.- Parameters:
tableResults
- the tableResults- Returns:
- the QueryOptions builder
-
suggestedRefinements
public QueryOptions.Builder suggestedRefinements(QueryLargeSuggestedRefinements suggestedRefinements)Set the suggestedRefinements.- Parameters:
suggestedRefinements
- the suggestedRefinements- Returns:
- the QueryOptions builder
-
passages
Set the passages.- Parameters:
passages
- the passages- Returns:
- the QueryOptions builder
-