Reputation: 989
When below command is run in solr 4.7.2
C:\dev\tools\solr-4.7.2\apache-tomcat-6.0.37\bin>curl "http://localhost:8080/solr-4.7.2/update/csv?commit=true&rowid=id&fieldnames=interfaceseq,extractnumber&separator=%09&stream.file=C:\
opt\invoices\input\5924usage_data1.dat&stream.contentType=text/csv&header=false&trim=true"
I get below error which i can not understand the reason.
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">400</int><int name="QTime">1</int></lst><lst name="error"><str name="msg">ERROR: [doc=0] unknown field 'interfaceseq'</str><int name="code">400</int></lst>
</response>
The file content is as below
10000000001 5923
Upvotes: 0
Views: 71
Reputation: 2391
unknown field 'interfaceseq'
The field 'interfaceseq' needs to be defined in Solr's schema. If you don't want to modify the schema, you could use dynamic fields (where the name of the field, normally the suffix, implicitly defines the field type).
For example, if this is an integer, name the field interfaceseq_i (since all fields ending with _i will be treated as integer fields).
if it's a string, name it interfaceseq_s
if it's a double, name it interfaceseq_d
and so on...
Upvotes: 1