Class QueryResponsePassage

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.discovery.v2.model.QueryResponsePassage
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class QueryResponsePassage
extends com.ibm.cloud.sdk.core.service.model.GenericModel
A passage query response.
  • Constructor Details

    • QueryResponsePassage

      public QueryResponsePassage()
  • Method Details

    • getPassageText

      public String getPassageText()
      Gets the passageText.

      The content of the extracted passage.

      Returns:
      the passageText
    • getPassageScore

      public Double getPassageScore()
      Gets the passageScore.

      The confidence score of the passage's analysis. A higher score indicates greater confidence.

      Returns:
      the passageScore
    • getDocumentId

      public String getDocumentId()
      Gets the documentId.

      The unique identifier of the ingested document.

      Returns:
      the documentId
    • getCollectionId

      public String getCollectionId()
      Gets the collectionId.

      The unique identifier of the collection.

      Returns:
      the collectionId
    • getStartOffset

      public Long getStartOffset()
      Gets the startOffset.

      The position of the first character of the extracted passage in the originating field.

      Returns:
      the startOffset
    • getEndOffset

      public Long getEndOffset()
      Gets the endOffset.

      The position of the last character of the extracted passage in the originating field.

      Returns:
      the endOffset
    • getField

      public String getField()
      Gets the field.

      The label of the field from which the passage has been extracted.

      Returns:
      the field
    • getConfidence

      public Double getConfidence()
      Gets the confidence.

      An estimate of the probability that the passage is relevant.

      Returns:
      the confidence
    • getAnswers

      public List<ResultPassageAnswer> getAnswers()
      Gets the answers.

      An array of extracted answers to the specified query.

      Returns:
      the answers