Hi all,

I'm trying to add multiple files to solr 1.4 with solrj.
With this programm 1 Doc is added to solr:

                SolrServer server = SolrHelper.getServer();
            server.deleteByQuery( "*:*" );// delete everything!
            server.commit();
            QueryResponse rsp = server.query( new SolrQuery( "*:*") );
            Assert.assertEquals( 0, rsp.getResults().getNumFound() );

ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract");
                up.addFile(new File("d:/temp/test.txt"));
//up.addFile(new File("d:/temp/test2.txt")); //<-- Nothing added if removing the comment from this line.
                up.setParam("literal.contid", "doc1");
                up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
                
                NamedList<Object> result = server.request(up);
                
                UpdateResponse test = server.commit();

But no doc is added, if i remove the comment tag from the second addFile.
What's wrong with this?


Thanks,

Thomas

Reply via email to