1. Interfaces

QuestionsAnswersOptions

Version:
TypeInterface
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

NameTypeDescriptionValue
keyphrasestringRequired.

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"
exactAnswerExactAnswerOptionsOptional.

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

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
ruleSearchRuleOptionsOptional.

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!