Instead of dataConfig=data-config.xml, use config=data-config.xml . From: sami <samta.malho...@gmail.com> Sent: Friday, March 1, 2019 3:05 AM To: solr-user@lucene.apache.org Subject: RE: Index database with SolrJ using xml file directly throws an error
Hi James, Thanks for your reply. I am not absolotuely sure I understood everything correctly here. I would like to index my database to start with fresh index. I have already done it with DIH execute function. <http://lucene.472066.n3.nabble.com/file/t494676/test1.png<http://lucene.472066.n3.nabble.com/file/t494676/test1.png>> It works absolutely fine. But, I want to use SolrJ API instead of using the inbuilt execute function. The data-config.xml and solrconfig.xml works fine with my database. I am using the same data-config.xml file and solrconfig.xml file to do the indexing with program mentioned in my query. String url = "http://localhost:8983/solr/test"; HttpSolrClient server = new HttpSolrClient.Builder(url).build(); ModifiableSolrParams params = new ModifiableSolrParams(); params.set("qt", "/dataimport"); params.set("command", "full-import"); params.set("clean", "true"); params.set("commit", "true"); params.set("optimize", "true"); params.set("dataConfig","data-config.xml"); *I tried this too. as you suggested not to use full path. * server.query(params); I checked the xml file for any bogus characters too. BUT the same files work fine with inbuilt DIH not with the code. What it could be? -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html<http://lucene.472066.n3.nabble.com/Solr-User-f472068.html>