1. @sitecore-cloudsdk/search/browser

QuestionsAnswersOptions

Version:

Type

Interface

Import path

@sitecore-cloudsdk/search/browser

Options for retrieving AI-powered questions and answers.

Signature

export interface QuestionsAnswersOptions {
  keyphrase: string;
  exactAnswer?: ExactAnswerOptions;
  relatedQuestions?: RelatedQuestionsOptions;
  rule?: SearchRuleOptions;
}

Properties

Name

Type

Description

Value

keyphrase

string

Required.

The text the site visitor enters in the search field to perform a search.

In questions-answers widgets, Sitecore Search only returns exactAnswer and relatedQuestions if it qualifies the keyphrase as a question or a statement. If it qualifies keyphrase as a keyword, the questions-answers widget returns empty.

Minimum length: 1.

Maximum length: 100.

"athletic sneakers"

exactAnswer

ExactAnswerOptions

Optional.

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

N/A

relatedQuestions

RelatedQuestionsOptions

Optional.

Options to retrieve AI-generated question-and-answer pairs relevant to the site visitor's query. Used in the questions-answers object of a widget item.

N/A

rule

SearchRuleOptions

Optional.

Options for rules. Rules are modifications to widget behavior that can be used to overwrite the natural set of search results, for example, to boost, bury, pin, and blacklist items.

N/A

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