RecordWithAnswer
- answerType: object · Answerrequired
The answer paragraph (i.e. a
<p>node) whose text content can answer users' question.- cssType: string · Css Selector
_selector requiredThe CSS selector that uniquely identifies the answer paragraph node in the original HTML content. This css selector matches exactly one HTML node that contains the answer paragraph. In order to be as unambiguous as possible, the returned CSS selector is in the form of a series of nth-child selectors starting from
:rootnode (which is usually the<html>). For example,:root > div:nth-child(1) > p:nth-child(2). This selector means the answer paragraph is a
<p>tag that is the second child of a<div>node, which is in turn, the first child of the:rootnode.This CSS selector is useful when you want to make the answer paragraph stand out from the rest of the document. For example, the following JQuery code turns the background color of the answer paragraph to yellow:
$(answer.css_selector).css("background-color", "yellow"); - probabilityType: number · Probabilitymin:0max:1required
The probability this paragraph can sufficiently answer the user's question (from 0.0 to 1.0).
- textType: string · Textrequired
The plain text version of answer paragraph.
- htmlType: string · Html
The answer paragraph in its original html tag, i.e. or the
outerHTMLof the answer paragraph node.
- productType: string · Product Id
_id max length:512requiredThe unique identifier of the product whose content contains the answer.
- answerType: object · Answer Block
_block In addition to the answer paragraph, we also return the **answer block**. Answer block is the ancestor node of the answer paragraph that cover not only the answer, but also the relevant context. This is particularly useful for applications that want to show the answer itself but also the relevant context surrounding the answer. Answer block is the smallest HTML element that contains the relevant context. However, not all the content inside this node is relevant. You can use the `relevant_children_slice` to identify a portion inside this block that is relevant to the answer.- answerType: string · Answer Css Selector
_css _selector requiredThe CSS selector to the selected answer paragraph inside the answer block. You can use this selector to select the answer from the answer block (as supposed to selecting from the HTML root) - cssType: string · Css Selector
_selector requiredThe CSS selector that uniquely identifies the answer block from the HTML root
- htmlType: string · Htmlrequired
The HTML content of the answer block
- relevantType: array · Relevant Children Slice
_children _slice requiredThe range of children nodes inside the answer block that is relevant to the selected answer.
- titleType: string · Titlerequired
The relevant title to the answer paragraph. This title is extracted from a header node close to the answer paragraph. If there is no such node, the title will be an empty string
