Search and Recommendation API参照およびデータモデル
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
Sitecore SearchのSearchおよび推薦APIは、開発者がコンテンツをクエリし、パーソナライズされたrecommendationsを受け取ることを可能にします。このトピックでは、公式API参照の入手方法を説明し、リクエストに必要なデータモデルの概要を提供します。
!重要データオブジェクトはすべての利用可能なオブジェクトを投稿する際にはAPI参照 を参照してください
以下のコードブロックはサンプルAPIリクエストを示し、いくつかの一般的なオブジェクトを一覧にしています。
{ "context": { "ids": { "property1": "string" , "property2": "string"
}, "locale": { "country": "us", "language": "en" }, "page": { "uri": "string" }, "user": { "uuid": "string" //or "user_id": "string" if your uuid does not follow the example here (https://doc.sitecore.com/search/en/developers/search-developer-guide/using-a-uuid-to-track-site-visitors.html) } }, "widget": { "items": { "entity": "string", "rfk_flags": "+semsearch" , "rfk_id": "string", "search": { "content": { "fields": "name", "price"
}, "facet": { "all": true, "max": 10, "sort": { "name": "text", "order": "asc" }, "types": { "after": "facetid_123", "exclude": "val1", "val2" , "filter": { "type": "or", "values": "facetid_123", "facetid_123"
}, "filtering_options": "hard_filters", "other_facet_values" , "keyphrase": "Sitecore", "max": 10, "min_count": 1, "name": "brands", "sort": { "name": "text", "order": "asc" } }
}, "filter": { "type": "string" }, "group_by": "group_id", "limit": 10, "offset": 0, "personalization": { "algorithm": "hard_filters", "fields": "brand", "color" , "ids": "id1", "id2"
}, "query": { "highlight": { "post_tag": "", "pre_tag": "" }, "keyphrase": "Sitecore", "operator": "or", "relevance": { "analyzer": "rfk_standard", "name": "color", "weight": 1 }
}, "ranking": { "name": "sales", "weight": 1 } , "related_questions": { "highlight": { "post_tag": "", "pre_tag": "" }, "max": 10 }, "rule": { "behaviors": true, "blacklist": { "filter": { "type": "string" } }, "boost": { "filter": { "type": "string" }, "slots": 1, 5
} , "bury": { "filter": { "type": "string" } }, "include": { "filter": { "type": "string" }, "slots": 1, 5
} , "pin": { "id": "id1", "slot": 1 }
}, "sort": { "choices": true, "value": { "name": "color", "order": "desc" }
}, "suggestion": { "max": 2, "name": "my_suggester" } , "swatch": { "fields": "name", "price" , "group_by": "group_id", "max": 10 } }, "sources": "sourceID1", "sourceID2"
}
} }