Class QueryResponse

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.discovery.v2.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 Details

    • QueryResponse

      public QueryResponse()
  • Method Details

    • getMatchingResults

      public Long getMatchingResults()
      Gets the matchingResults.

      The number of matching results for the query.

      Returns:
      the matchingResults
    • getResults

      public List<QueryResult> getResults()
      Gets the results.

      Array of document results for the query.

      Returns:
      the results
    • getAggregations

      public List<QueryAggregation> getAggregations()
      Gets the aggregations.

      Array of aggregations for the query.

      Returns:
      the aggregations
    • getRetrievalDetails

      public RetrievalDetails getRetrievalDetails()
      Gets the retrievalDetails.

      An object contain retrieval type information.

      Returns:
      the retrievalDetails
    • getSuggestedQuery

      public String getSuggestedQuery()
      Gets the suggestedQuery.

      Suggested correction to the submitted **natural_language_query** value.

      Returns:
      the suggestedQuery
    • getSuggestedRefinements

      public List<QuerySuggestedRefinement> getSuggestedRefinements()
      Gets the suggestedRefinements.

      Array of suggested refinements.

      Returns:
      the suggestedRefinements
    • getTableResults

      public List<QueryTableResult> getTableResults()
      Gets the tableResults.

      Array of table results.

      Returns:
      the tableResults
    • getPassages

      public List<QueryResponsePassage> getPassages()
      Gets the passages.

      Passages returned by Discovery.

      Returns:
      the passages