基本的なrecommendationsを得る
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
recommendationsの最も基本的なリクエストは、空のrecommendations.contentオブジェクトをSitecore Search送ることです。これは管理者がSearchで設定した内容、recommendationウィジェットのレシピに基づいてrecommendationsされます。
完全なデータモデルについては、Search and Recommendation APIリファレンスを参照してください。
以下は*、コンテンツエンティティに対して5*つのrecommendationsを得るためのサンプルリクエストです:
{ "context": { "locale": "en-us", "page": { "uri": "/content/Using-fresh-flowers-to -decorate" } }, "source": "12345", "widget": { "items": { "entity": "content", "rfk_id": "rfkid_1", "recommendations": { "content": {}, "limit": 5 } }
} }
以下はサンプルの回答です:
{ "widgets": { "rfk_id": "rfkid_2000", "type": "recommendation", "used_in": "page", "entity": "content", "content": { "title": "Decorating Your Home with Fragrances", "description": "Discover ways to make your home smell wonderful with our guide to using room sprays, diffusers, and scented candles.", "image_url": "//assets.example.com/content/decorating_your_home_with_fragrances.jpg", "content_url": "/content/decorating-your-home-with-fragrances", "author": "Jane Doe", "publication_date": "2024-04-01", "category": "Home Decor" }, { "title": "The Benefits of Aromatherapy", "description": "Learn about the benefits of aromatherapy and how different scents can improve your health and mood.", "image_url": "//assets.example.com/content/benefits_of_aromatherapy.jpg", "content_url": "/content/benefits-of-aromatherapy", "author": "John Smith", "publication_date": "2024-03-15", "category": "Wellness" } ... , "total_item": 5, "limit": 5, "offset": 0 } , "dt": 133, "ts": 1714507825540 }