1. @sitecore-cloudsdk/search/browser

ExactAnswerOptions

Version:

Type

Interface

Import path

@sitecore-cloudsdk/search/browser

Options to retrieve a single answer to the site visitor's query. Used in the questions-answers object of a widget item.

Signature

export interface ExactAnswerOptions {
  includeSources?: boolean;
  queryTypes?: ArrayOfAtLeastOne<QueryType>;
}

Properties

Name

Type

Description

Value

includeSources

boolean

Optional.

Include configured additional attributes from index documents used to generate this answer.

true

queryTypes

QueryType[]

Optional.

The type of site visitor query to retrieve an exact answer for.

Set this value to an array of one or a combination of the following query types:

  • "question" - get an exact answer only if the site visitor enters a question.

  • "statement" - get an exact answer only if the site visitor enters a statement.

  • "keyword" - get an exact answer only if the site visitor enters keywords.

Consider the following setting:

queryTypes: ["question", "statement"]

If the site visitor searches "How high is Mount Everest?", an exact answer is returned because the site visitor entered a question.

If the site visitor searches "Mount Everest is very high", an exact answer is returned because the site visitor entered a statement.

If the site visitor searches "Everest height meters", an exact answer is not returned because the site visitor entered only keywords, not a question or statement.

Minimum length: 1.

  • ["question"]

  • ["question", "statement"]

If you have suggestions for improving this article, let us know!