寻找 solr 查询,它将包括缺少字段的结果和给定范围内的数字的相同字段

Looking for solr query which will include results with both missing field and the same field which has number within a given range

假设我有以下数据

{
 fruit: "Mango",
 cost : 2.00,
 variety : "alphanso",
},
{
 fruit : "apple",
 cost : 1.40,
 variety : "Gala"
},
{
 fruit : "apple",
 variety : "cosmic crisp",
},
{
fruit : "apple",
variety : "honey crisp",
cost : 2.99
}

我正在寻找 returns 成本介于 1 和 2 之间的苹果以及 returns 没有设置成本字段的品种。

在这种情况下,结果将包含 "Gala" 和 "cosmic crisp"

从完整的文档集 *:* 开始,减去具有值 [* TO *] 的文档,并添加匹配 variety:Gala.

的文档
q=(*:* -cost:[* TO *]) OR variety:Gala