lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Problem indexing files
Date Wed, 20 Jan 2010 00:39:24 GMT

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


Mime
View raw message