【发布时间】:2015-09-29 08:31:43
【问题描述】:
我在 Solr 中使用内部联接,以下查询对我来说很好:
{!join from =_id to = relations.collection2.key fromIndex = collection2_shard1_replica1 cache=true}_id:{!join from =_id to = Relations.collection3.key fromIndex = collection3_shard1_replica1 cache=true}name:"cloudProducts"
现在,我正在尝试对名称条件使用 IN 查询,例如 name:("cloudProducts" OR "mobileStation" OR "standAlone"),所以我的查询如下:
{!从 =_id 加入到 =relationships.covered.targets.key fromIndex = app.coveredassets_shard1_replica1 缓存=true}_id:{!从 =_id 加入 =relationships.product.targets.key fromIndex = app.products_shard1_replica1 缓存=true}str_extensions.tenant.lineOfBusiness.value.name:("cloudProducts" OR "mobileStation" OR "standAlone")
但它给出了解析异常。我尝试操纵语法但没有成功。是否可以在 Solr 内部连接中使用 IN 查询?谁能帮我这个?
【问题讨论】:
-
如果默认运算符为 OR,那么您可以将查询指定为 - name:('cloudProducts' 'mobileStation' 'standAlone')。您能否提供异常的详细信息
-
否,OR 不是默认运算符
-
"str_extensions.tenant.lineOfBusiness.value" 这是什么值?...这是“名称”的前缀?...在前面的查询中没有...
-
"str_extensions.tenant.lineOfBusiness.value 是字段名
标签: solr inner-join