您位於此處:
Search for Pages Using Attribute Values
Developers can specify that component or page attributes are indexed and searchable. When attributes are searchable, users can find pages by searching for the attribute value. For example, users can search for the text configured for a rich text attribute.
How: Add the searching object to the
definition of the attribute you want indexed, as in the following example:
{
"id": "heading",
"name": "Banner Heading",
"required": true,
"type": "text",
"searching": {
"searchable": true,
"refinable": true
}
},
Attributes of following types can be designated as searchable. If the searchable value
is not specified, the default is false.
- string
- text
- markup
- product
- category
- cms_record
- custom
- enum-of-string
The refinable value indicates whether a user can
further refine search results based on the content of this attribute. All searchable attribute types can be designated as refinable except cms_record and custom.
For attributes of type custom, all elements of the attribute are considered as text for
purposes of indexing. For attributes of type cms_record, only attributes of the cms_record
that are supported as searchable are added to the
index. For example, if the cms_record includes an attribute of type image, the image is not
indexed.

