2
我在可用的字段类型之间存在一些混淆。 string
vs strings
和int
vs ints
以及其他数据类型。字段类型字符串与字符串
以下4点有什么区别?
<field name="string_multi" type="string" multiValued="true" indexed="true" stored="true"/>
<field name="string_single" type="string" indexed="true" stored="true"/>
<field name="strings_multi" type="strings" multiValued="true" indexed="true" stored="true"/>
<field name="strings_single" type="strings" indexed="true" stored="true"/>
鉴于我有文档,我应该为我的字段名为hashtags
声明什么?
String multivalued
或strings multivalue
或strings without multivalue
,?
{
"polarity":0.0,
"text":"RT @socialistudents: Vlad - we go to NUS conference not just as individuals but as members of Socialist Students #SocStu17",
"created_at":"Sun Feb 12 19:28:34 +0000 2017",
"hashtags":[
"hashtag1",
"hashtag2"
],
"subjectivity":0.0,
"retweet_recount":4,
"id":830861171582439424,
"favorite_count":0
}
定义'字段名称'时会感到困惑。因此,您可以将属性'multiValued'声明为这样的' '。那么,他们原来是一样的。只是有点令人困惑,并且在'field name'期间使'multiValued'变得冗余。由于'multiValued'将由'字段类型'决定。 –
是的,对不起,我错过了第二个's'。固定 – Jayce444
是的,你也可以在场上宣布'多值'。因此,根据您的标签数据结构,您可以在您的字段定义中放置'multiValued =“true”' – Jayce444