我是Solr的初学者。我正在尝试将嵌套的文档/ JSON存储到Solr文档中。
{
"source_ln":"en",
"source_text":"I joined a gym",
"target_ln":"hi",
"target_text":"मैंने एक जिम ज्वाइन किया",
"organizations":["2e540ba1-fbe3-4aba-b77a-d78755f917b2"],
"tags": {
"food": 2,
"travel": 2
}
}
答案 0 :(得分:1)
是的,Solr将能够做到这一点。多亏了Block Join查询解析器。
在尝试执行此操作之前,需要注意的事情很少。
root
childDocuments
键来表示JSON中的嵌套文档示例
[
{
"id": "1",
"title": "Solr adds block join support",
"content_type": "parentDocument",
"_childDocuments_": [
{
"id": "2",
"comments": "SolrCloud supports it too!"
}
]
},
{
"id": "3",
"title": "New Lucene and Solr release is out",
"content_type": "parentDocument",
"_childDocuments_": [
{
"id": "4",
"comments": "Lots of new features"
}
]
}
]