I'm not sure if i fully understand what you mean, but is it possible that "contid" is your uniqueKey field? ... if so you are probably adding two documents, both with the same ID, so the second overwrites the first.
If i'm mistaken, then could you elaborate a bit more -- provide your configs/schema and ad some more asserts with a comment explaining which assertions fail. : 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 : -Hoss