Search code examples
csvsolr

Getting Error on Updating CSV file into SOLR: Expected fieldnames in CSV input


I wanna Import a csv File using File Path But whene i want to upload this i get msg= Expected fieldnames in CSV input ErrorNumber=400

I am using this url :

http://localhost:8983/solr/Log/update?wt=json&commitWithin=1000&overwrite=true&stream.file=Log\Log.csv&stream.contentType=text/plain;charset=utf-8

Im using SOLR 4.2 and my file is Store in c:. i am using Windows 8.1

thank you


Solution

  • I found a solution. I changed the query URL to something like this and it worked

    http://localhost:xxxx/solr/update/csv?stream.file=<remote path>/Log.csv&stream.contentType=text/plain;charset=utf-8
    

    just replace "remote path" with your own path