feat(rules): Client side information consequence in rules
还没有人认领这个 Issue。
- #730 来自 @aallam —— 已关闭,未合并
评估
调研方向
从链接的内部 specs issue #152 开始,然后追踪 rules.consequence 在 Java 客户端 search response 中的表示方式。当客户端暴露 renderingContent,并包含 issue 中描述的 redirect、facetMerchandising 和 userData 结构,以及其中所述的必填字段和 response shape 时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Summary
With the release of the merchandising UI, the need to control UI aspects using the QR is growing and the rules API needs to expose fields to store information to perform specific client side tasks in a structured way.
The new consequence consequence.renderingContent contains a json object where each top level attribute is restricted to known use cases. The currently identified use cases are:
- Redirect
- Facet merchandising / ordering
- User defined data
Each top level excepted the userData one have a schema which is enforced and strict and customers can add metadata using the userData object:
{
"condition": {
"anchoring": "is",
"pattern": "samsung"
},
"consequence": {
"renderingContent": {
"redirect": {
"url": "https://algolia.com/samsung" // required by the API
},
"facetMerchandising": {
"order": [ "brand", "price"] // required by the API
},
"userData": {
"callback": "displayBrand(samsung)" // optional field defined by user
}
}
}
}
This information will be returned in a structured way in the path rules.consequence of the search response:
{
"hits": [...],
[...],
"query": "samsung",
"rules": {
"consequence": {
"renderingContent": [ // Array containing the content of matching rules
{
"facetMerchandising": {
"order": [
"brand",
"price"
]
},
"redirect": {
"url": "https://algolia.com/samsung"
},
"userData": {
"callback": "displayBrand(samsung)"
}
}
]
}
},
"userData": [ // Legacy userData
{
"myUserData": {}
}
]
}
Internal specs issue: #152
- 主要语言
- Java
- 星标
- 51
- 派生
- 33
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
algolia/algoliasearch-client-java 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 25/100
algolia/algoliasearch-client-java#788 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
algolia/algoliasearch-client-java#781 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
查看 algolia/algoliasearch-client-java 的全部 Issue
相似的 Issue
-
bug pdd
难度 2/5 1 小时以内 新手友好度 76/100
objectionary/eoc#1555 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ClouGence/open-cdm#487 · 2 条评论 ·
维护者通常 1 天内回复
-
security
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复