: > new documents with the same UniqueID and Solr will delete the old : > documents automaticly ... this way you are guaranteed not to have an empty : > index : : That works if you keep track of all documents that have disappeared : since the last index run. Otherwise, you end up with orphans in
a solution i use to deal with this in some cases is to have a timestamp field recording when the doc was indexed, and after each "batch" update run, search for all docs with a timestamp prior to the start of hte run ... if the percentage of docs is really high throw and error and abort, but if it's in an accptible range, then delete them all (using delete by query) the percentage of old docs sanity check isn't strictly neccessary, especially if you current approach is delete all first, then read -- this approach is never any risker then that one, even without the sanity test. -Hoss