Package version:

Interface QueryAnswerResult

An answer is a text passage extracted from the contents of the most relevant documents that matched the query. Answers are extracted from the top search results. Answer candidates are scored and the top answers are selected.

interface QueryAnswerResult {
    highlights?: string;
    key: string;
    score: number;
    text: string;
    [property: string]: any;
}

Indexable

  • [property: string]: any

    Describes unknown properties. The value of an unknown property can be of "any" type.

Properties

highlights?: string

Same text passage as in the Text property with highlighted text phrases most relevant to the query. NOTE: This property will not be serialized. It can only be populated by the server.

key: string

The key of the document the answer was extracted from. NOTE: This property will not be serialized. It can only be populated by the server.

score: number

The score value represents how relevant the answer is to the query relative to other answers returned for the query. NOTE: This property will not be serialized. It can only be populated by the server.

text: string

The text passage extracted from the document contents as the answer. NOTE: This property will not be serialized. It can only be populated by the server.