Class QueryLargePassages
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class QueryLargePassages
extends com.ibm.cloud.sdk.core.service.model.GenericModel
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryLargePassages.Builder
Builder. -
Method Summary
Modifier and Type Method Description Long
characters()
Gets the characters.Long
count()
Gets the count.Boolean
enabled()
Gets the enabled.List<String>
fields()
Gets the fields.Boolean
findAnswers()
Gets the findAnswers.Long
maxAnswersPerPassage()
Gets the maxAnswersPerPassage.Long
maxPerDocument()
Gets the maxPerDocument.QueryLargePassages.Builder
newBuilder()
New builder.Boolean
perDocument()
Gets the perDocument.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Method Details
-
newBuilder
New builder.- Returns:
- a QueryLargePassages builder
-
enabled
Gets the enabled.A passages query that returns the most relevant passages from the results.
- Returns:
- the enabled
-
perDocument
Gets the perDocument.If `true`, ranks the documents by document quality, and then returns the highest-ranked passages per document in a `document_passages` field for each document entry in the results list of the response.
If `false`, ranks the passages from all of the documents by passage quality regardless of the document quality and returns them in a separate `passages` field in the response.
- Returns:
- the perDocument
-
maxPerDocument
Gets the maxPerDocument.Maximum number of passages to return per document in the result. Ignored if `passages.per_document` is `false`.
- Returns:
- the maxPerDocument
-
fields
Gets the fields.A list of fields to extract passages from. If this parameter is an empty list, then all root-level fields are included.
- Returns:
- the fields
-
count
Gets the count.The maximum number of passages to return. Ignored if `passages.per_document` is `true`.
- Returns:
- the count
-
characters
Gets the characters.The approximate number of characters that any one passage will have.
- Returns:
- the characters
-
findAnswers
Gets the findAnswers.When true, `answer` objects are returned as part of each passage in the query results. The primary difference between an `answer` and a `passage` is that the length of a passage is defined by the query, where the length of an `answer` is calculated by Discovery based on how much text is needed to answer the question.
This parameter is ignored if passages are not enabled for the query, or no **natural_language_query** is specified.
If the **find_answers** parameter is set to `true` and **per_document** parameter is also set to `true`, then the document search results and the passage search results within each document are reordered using the answer confidences. The goal of this reordering is to place the best answer as the first answer of the first passage of the first document. Similarly, if the **find_answers** parameter is set to `true` and **per_document** parameter is set to `false`, then the passage search results are reordered in decreasing order of the highest confidence answer for each document and passage.
The **find_answers** parameter is available only on managed instances of Discovery.
- Returns:
- the findAnswers
-
maxAnswersPerPassage
Gets the maxAnswersPerPassage.The number of `answer` objects to return per passage if the **find_answers** parmeter is specified as `true`.
- Returns:
- the maxAnswersPerPassage
-