在Solr内部联接的查询中使用

在Solr内部联接的查询中使用,solr,inner-join,Solr,Inner Join,我正在Solr中使用内部联接,下面的查询对我来说很好: {!join from=\u id to=relationships.collection2.key fromIndex=collection2\u shard1\u replica1 cache=true}\u id:{!join from=\u id to=relationships.collection3.key fromIndex=collection3\u shard1\u replica1 cache=true}名称:cloud

我正在Solr中使用内部联接,下面的查询对我来说很好:

{!join from=\u id to=relationships.collection2.key fromIndex=collection2\u shard1\u replica1 cache=true}\u id:{!join from=\u id to=relationships.collection3.key fromIndex=collection3\u shard1\u replica1 cache=true}名称:cloudProducts

现在,我尝试在查询中使用名称条件,如名称:cloudProducts或mobileStation或standAlone,因此我的查询如下:


{!join from=\u id to=relationships.covered.targets.key fromIndex=app.coveredassets\u shard1\u replica1 cache=true}{!join from=\u id to=relationships.product.targets.key fromIndex=app.products\u shard1\u replica1 cache=true}stru extensions.tenant.lineOfBusiness.value.名称:cloudProducts或mobileStation或Standation


但它给出了解析异常。我试图操纵语法,但没有成功。是否可以在Solr内部联接的查询中使用?有人能帮我吗

我能够通过在内部联接中传递带有“v”关键字的内部查询来解决这个问题


{!join from=\u id to=relationships.covered.targets.key fromIndex=app.coveredassets\u shard1\u replica1 cache=true}{!join from=\u id to=relationships.product.targets.key fromIndex=app.products\u shard1\u replica1 cache=true v=str\u extensions.tenant.lineOfBusiness.value.name:cloudProducts或mobileStation或standAlone}

您可以使用v=$innerQuery并在Solr参数中传递内部查询的值

{!join from=\u id to=relationships.covered.targets.key fromIndex=app.coveredassets\u shard1\u replica1 cache=true}\u id:{!join from=\u id to=relationships.product.targets.key fromIndex=app.products\u shard1\u replica1 cache=true v=$innerQuery}

参数:
distrib=false&innerJoinQuery1=str_extensions.tenant.lineOfBusiness.value.name:cloudProducts或mobileStation或standAlone

如果默认运算符为或,则只需将查询命名为-name:'cloudProducts''mobileStation''standAlone即可。您能否提供例外情况的详细信息否,或者不是默认运算符tr_extensions.tenant.lineOfBusiness.value此值是多少?。。。哪个是名称的前缀?…在前面的查询中没有…str_extensions.tenant.lineOfBusiness.value是字段名