我是索尔的新手。 尝试将csv文件上传到我当地的Solr 这是CSV文件
Col_1 Name Workouts To_Do
1 Abh gym 123
2 Kar pilate wh123Ap
3 adi “sw Like123
命令:curl' http://localhost:8983/solr/demo4/update?commit=true' --data-binary @ / home / User1 / solr-7.2.1 / example / test_solr_csv / test1.csv -H' Content-type:application / csv; charset = utf-8'
managedschema中的值:
<field name="Col_1" type="plongs"/>
<field name="Name" type="text_general"/>
<field name="To_Do" type="string"/>
<field name="Workouts" type="text_general"/>
我猜问题是由于字段的混合数据类型。我已经将To_Do字段的类型设置为&#34; string&#34;。但在运行命令之后,它又变回了&#34; plongs&#34;和 我收到以下错误:
{
"responseHeader":{
"status":400,
"QTime":231},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","java.lang.NumberFormatException"],
"msg":"ERROR: [doc=1c5909cc-8d10-40d7-96fb-f3b25aa2d965] Error adding field 'To_Do'='wh123Ap' msg=For input string: \"wh123Ap\"",
"code":400}}