Class QueryResponse
java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.discovery.v1.model.QueryResponse
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class QueryResponse
extends com.ibm.cloud.sdk.core.service.model.GenericModel
A response containing the documents and aggregations for the query.
-
Constructor Summary
Constructors Constructor Description QueryResponse()
-
Method Summary
Modifier and Type Method Description List<QueryAggregation>
getAggregations()
Gets the aggregations.Long
getDuplicatesRemoved()
Gets the duplicatesRemoved.Long
getMatchingResults()
Gets the matchingResults.List<QueryPassages>
getPassages()
Gets the passages.List<QueryResult>
getResults()
Gets the results.RetrievalDetails
getRetrievalDetails()
Gets the retrievalDetails.String
getSessionToken()
Gets the sessionToken.String
getSuggestedQuery()
Gets the suggestedQuery.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Constructor Details
-
QueryResponse
public QueryResponse()
-
-
Method Details
-
getMatchingResults
Gets the matchingResults.The number of matching results for the query.
- Returns:
- the matchingResults
-
getResults
Gets the results.Array of document results for the query.
- Returns:
- the results
-
getAggregations
Gets the aggregations.Array of aggregation results for the query.
- Returns:
- the aggregations
-
getPassages
Gets the passages.Array of passage results for the query.
- Returns:
- the passages
-
getDuplicatesRemoved
Gets the duplicatesRemoved.The number of duplicate results removed.
- Returns:
- the duplicatesRemoved
-
getSessionToken
Gets the sessionToken.The session token for this query. The session token can be used to add events associated with this query to the query and event log.
**Important:** Session tokens are case sensitive.
- Returns:
- the sessionToken
-
getRetrievalDetails
Gets the retrievalDetails.An object contain retrieval type information.
- Returns:
- the retrievalDetails
-
getSuggestedQuery
Gets the suggestedQuery.The suggestions for a misspelled natural language query.
- Returns:
- the suggestedQuery
-