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.BuilderaddCollectionIds(String collectionIds)Adds an collectionIds to collectionIds.QueryOptions.BuilderaddReturnField(String returnField)Adds an returnField to xReturn.QueryOptions.Builderaggregation(String aggregation)Set the aggregation.QueryOptionsbuild()Builds a QueryOptions.QueryOptions.BuildercollectionIds(List<String> collectionIds)Set the collectionIds.QueryOptions.Buildercount(long count)Set the count.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(QueryLargePassages passages)Set the passages.QueryOptions.BuilderprojectId(String projectId)Set the projectId.QueryOptions.Builderquery(String query)Set the query.QueryOptions.Buildersort(String sort)Set the sort.QueryOptions.BuilderspellingSuggestions(Boolean spellingSuggestions)Set the spellingSuggestions.QueryOptions.BuildersuggestedRefinements(QueryLargeSuggestedRefinements suggestedRefinements)Set the suggestedRefinements.QueryOptions.BuildertableResults(QueryLargeTableResults tableResults)Set the tableResults.QueryOptions.BuilderxReturn(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
-