在 solr 字段列表中应用 If 条件

发布于 2025-01-13 10:20:25 字数 570 浏览 1 评论 0原文

我需要一个变量值,它将根据我使用的条件计算该值。

我需要应用 if 条件,如果条件存在,我需要返回值 1 else 0

我的逻辑是:

{!field f=temp_close_timing v='[2022-03-11T11:14:39.667679 TO 2022-03-11T11:14:39.667679]'}

如果我们从上述语句中获取值,我们需要返回 true,否则返回 false。

我不知道该怎么做。我已经尝试过这里的存在条件,但我不知道如何在佛罗里达州纠正相同的情况 例如:

fl=if((exists({!field f=temp_close_timing v='[2022-03-11T11:14:39.667679 TO 2022-03-11T11:14:39.667679]'}),1,0),1,0)

但在这里我收到错误 "Error parsing fieldname: Expected identifier at pos 3 str="

我不确定如何分配变量以及是否分配应单独索引的变量。

I need a variable value, which will compute the value on the basis of condition I have used.

I need to apply if condition and in case that condition exists I need to return the value as 1 else 0

My logic is:

{!field f=temp_close_timing v='[2022-03-11T11:14:39.667679 TO 2022-03-11T11:14:39.667679]'}

If we get the value from the above statement, we need to return true else return false.

I am not sure how to do this. I have tried exists condition here but I am not sure how to right the same in FL
eg:

fl=if((exists({!field f=temp_close_timing v='[2022-03-11T11:14:39.667679 TO 2022-03-11T11:14:39.667679]'}),1,0),1,0)

but here I am getting error as "Error parsing fieldname: Expected identifier at pos 3 str="

I am not sure how to assign variable and if I assign variable that should be indexed separately.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文