在 Solr 连接查询的结果中获取连接数据
Get joined data in result for Solr Join Query
我有以下 json 个文件:
[{
"entity_id":"A1",
"entity_desc":"cat",
"relation_id": "A2",
"relation_type":"kind of"
},
{
"entity id":"A2",
"entity_desc":"Animal",
"relation_id": "A9",
"relation_type":"xyz"
} ,
]
我已经用 solr 索引了它们,现在我想使用连接查询来获取结果:
cat "is kind of" Animal.
如何将文档1
中的relation_id
映射到文档2
中的relation_id
?
提前致谢
无法从两个实体获得结果。
您只能通过加入的实体来限制您的查询。
此处引自solr wiki:
Joins in Solr are not really equivalent to
SQL Joins because no information about the table being joined "from"
is carried forward into the final result.
A more appropriate SQL analogy would be an "inner query".
我有以下 json 个文件:
[{
"entity_id":"A1",
"entity_desc":"cat",
"relation_id": "A2",
"relation_type":"kind of"
},
{
"entity id":"A2",
"entity_desc":"Animal",
"relation_id": "A9",
"relation_type":"xyz"
} ,
]
我已经用 solr 索引了它们,现在我想使用连接查询来获取结果:
cat "is kind of" Animal.
如何将文档1
中的relation_id
映射到文档2
中的relation_id
?
提前致谢
无法从两个实体获得结果。 您只能通过加入的实体来限制您的查询。
此处引自solr wiki:
Joins in Solr are not really equivalent to SQL Joins because no information about the table being joined "from" is carried forward into the final result. A more appropriate SQL analogy would be an "inner query".