public class QueryOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
QueryOptions.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
aggregation |
protected java.util.List<java.lang.String> |
collectionIds |
protected java.lang.Long |
count |
protected java.lang.String |
filter |
protected java.lang.Boolean |
highlight |
protected java.lang.String |
naturalLanguageQuery |
protected java.lang.Long |
offset |
protected QueryLargePassages |
passages |
protected java.lang.String |
projectId |
protected java.lang.String |
query |
protected java.lang.String |
sort |
protected java.lang.Boolean |
spellingSuggestions |
protected QueryLargeSuggestedRefinements |
suggestedRefinements |
protected QueryLargeTableResults |
tableResults |
protected java.util.List<java.lang.String> |
xReturn |
Modifier | Constructor and Description |
---|---|
protected |
QueryOptions(QueryOptions.Builder builder) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
aggregation()
Gets the aggregation.
|
java.util.List<java.lang.String> |
collectionIds()
Gets the collectionIds.
|
java.lang.Long |
count()
Gets the count.
|
java.lang.String |
filter()
Gets the filter.
|
java.lang.Boolean |
highlight()
Gets the highlight.
|
java.lang.String |
naturalLanguageQuery()
Gets the naturalLanguageQuery.
|
QueryOptions.Builder |
newBuilder()
New builder.
|
java.lang.Long |
offset()
Gets the offset.
|
QueryLargePassages |
passages()
Gets the passages.
|
java.lang.String |
projectId()
Gets the projectId.
|
java.lang.String |
query()
Gets the query.
|
java.lang.String |
sort()
Gets the sort.
|
java.lang.Boolean |
spellingSuggestions()
Gets the spellingSuggestions.
|
QueryLargeSuggestedRefinements |
suggestedRefinements()
Gets the suggestedRefinements.
|
QueryLargeTableResults |
tableResults()
Gets the tableResults.
|
java.util.List<java.lang.String> |
xReturn()
Gets the xReturn.
|
protected java.lang.String projectId
protected java.util.List<java.lang.String> collectionIds
protected java.lang.String filter
protected java.lang.String query
protected java.lang.String naturalLanguageQuery
protected java.lang.String aggregation
protected java.lang.Long count
protected java.util.List<java.lang.String> xReturn
protected java.lang.Long offset
protected java.lang.String sort
protected java.lang.Boolean highlight
protected java.lang.Boolean spellingSuggestions
protected QueryLargeTableResults tableResults
protected QueryLargeSuggestedRefinements suggestedRefinements
protected QueryLargePassages passages
protected QueryOptions(QueryOptions.Builder builder)
public QueryOptions.Builder newBuilder()
public java.lang.String projectId()
The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
public java.util.List<java.lang.String> collectionIds()
A comma-separated list of collection IDs to be queried against.
public java.lang.String filter()
A cacheable query that excludes documents that don't mention the query content. Filter searches are better for metadata-type searches and for assessing the concepts in the data set.
public java.lang.String query()
A query search returns all documents in your data set with full enrichments and full text, but with the most relevant documents listed first. Use a query search when you want to find the most relevant search results.
public java.lang.String naturalLanguageQuery()
A natural language query that returns relevant documents by utilizing training data and natural language understanding.
public java.lang.String aggregation()
An aggregation search that returns an exact answer by combining query search with filters. Useful for applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query reference.
public java.lang.Long count()
Number of results to return.
public java.util.List<java.lang.String> xReturn()
A list of the fields in the document hierarchy to return. If this parameter not specified, then all top-level fields are returned.
public java.lang.Long offset()
The number of query results to skip at the beginning. For example, if the total number of results that are returned is 10 and the offset is 8, it returns the last two results.
public java.lang.String sort()
A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no prefix is specified. This parameter cannot be used in the same query as the **bias** parameter.
public java.lang.Boolean highlight()
When `true`, a highlight field is returned for each result which contains the fields which match the query with `` tags around the matching query terms.
public java.lang.Boolean spellingSuggestions()
When `true` and the **natural_language_query** parameter is used, the **natural_language_query** parameter is spell checked. The most likely correction is returned in the **suggested_query** field of the response (if one exists).
public QueryLargeTableResults tableResults()
Configuration for table retrieval.
public QueryLargeSuggestedRefinements suggestedRefinements()
Configuration for suggested refinements.
public QueryLargePassages passages()
Configuration for passage retrieval.