how to use solr using ubantu terminal when installed solr using solr user.

Posted July 27, 2017 2.5k views
ApacheDebianJavaData Analysis

i tried to post the json file using the post as
sudo su - solr -c “/opt/solr/bin/post -c practice example/films/films.json”
but i am getting : Unrecognized argument: example/films/films.json.
(please help and provide a way so that i can use other commands also without facing such kind of problems in ubantu.)

1 comment
  • i got the post using
    sudo su - solr -c “/opt/solr/bin/post -c practice /opt/solr/example/films/films.json”
    but it is returning 2 warnings as
    SimplePostTool: WARNING: Solr returned an error #400 (Bad Request) for url: http://localhost:8983/solr/practice/update/json/docs
    SimplePostTool: WARNING: Response: {“responseHeader”:{“status”:400,“QTime”:85},“error”:{“metadata”:[“error-class”,“org.apache.solr.common.SolrException”,“root-error-class”,“java.lang.NumberFormatException”],“msg”:“ERROR: [doc=/en/quieneselsenorlopez] Error adding field ‘name’='¿Quién es el señor López?’ msg=For input string: "¿Quién es el señor López?"”,“code”:400}}
    SimplePostTool: WARNING: IOException while reading response: Server returned HTTP response code: 400 for URL: http://localhost:8983/solr/practice/update/json/docs
    thank you

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!