在 solr 字段列表中应用 If 条件
我需要一个变量值,它将根据我使用的条件计算该值。
我需要应用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论