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