views:

303

answers:

2

My data-config.xml defines 3 different entities under the document tag (lets call them foo, bar and baz). When I issue a basic full import localhost:8983/solr/dataimport?command=full-import, only 2 of the 3 entities get indexed (foo and bar are in my index but baz never makes it). However, if I then issue a command to just import baz via localhost:8983/solr/dataimport?command=full-import&entity=baz&clean=false it adds baz documents just fine and the index then has all 3 types.

Does anyone have any thoughts on why one entity gets skipped in the general data import but then still works okay if I specifically call it out? Is there an error/warning log I can check? Nothing bad shows up in /solr/logs/ but those just appear to be request logs.

+1  A: 

Okay, I figured out what was happening. Each entity in my data-config.xml had a field called "id" but I also had <uniqueKey>id</uniqueKey> set in schema.xml. So solr documents for baz were getting overwritten by documents from foo because they both had the same numeric id. I switched my schema.xml so that each entity had a completely unique id, problem solved.

lerhaupt