Hug*_*ugo 2 logic numeric algolia
我们正在使用 Algolia 作为我们的搜索引擎。在一个索引中,我们有一个属性:contract.monthDuration,它包含整数。
我成功地使用了以下数字过滤器:
"contract.monthDuration:0 to 3"
Run Code Online (Sandbox Code Playgroud)
但我无法使用类似的东西
"contract.monthDuration:0 to 3" OR "contract.monthDuration:4 to 6"
Run Code Online (Sandbox Code Playgroud)
我试过了 :
"contract.monthDuration:0 to 3 OR contract.monthDuration:4 to 6"
"contract.monthDuration:0 to 3,4 to 6"
"contract.monthDuration:0 to 3, contract.monthDuration:4 to 6"
"(contract.monthDuration:0 to 3, contract.monthDuration:4 to 6)"
Run Code Online (Sandbox Code Playgroud)
正确的语法是
"(contract.monthDuration:0 to 3, contract.monthDuration:4 to 6)"
Run Code Online (Sandbox Code Playgroud)
它实际上在使用 JS API 时有效,但在 algolia 仪表板中直接测试时无效。