: updated version of patch. Addresses some of Hoss' (minor) comments. : Also, the .doc() method of SolrIndexSearcher will added the unique key : field unconditionally if it is present in the schema. IT is used : randomly in several places and including checks for it in other places : decreases readability.
We probably don't want to add the unique key field directly to Set passed by the client -- partially because it's bad form to modify a collection as a side affect of another method, but also because Set.add is an optional method that might through UnsupportedOperationException. -Hoss