我在此结构中有几个JSON文件:
{
"book" : {
"truncated" : "true",
"title": "This is a very long book title and theref"
"full_title" : "This is a very long book title and therefore it is truncated"
}
}
或者看起来像这样:
{
"book" : {
"truncated" : "false",
"title": "This is a very short title"
}
}
我想将这些文件导入Solr 7.4.0。我的schema.xml具有以下定义:
<field name="booktitle" type="string"/>
现在,当我导入数据时,如果full_title
为true,我总是要取truncated
的内容,否则为title
。正确的机制是什么?