def _locked_refresh_doc_ids(self):
        """Assumes that the caller has the _index_lock !
        """
        d = {}
        for s in self._shards:
            for k in s.doc_index.keys():
                if k in d:
                    raise KeyError('doc "{i}" found in multiple repos'.format(i=k))
                d[k] = s
        self._doc2shard_map = d
def _locked_refresh_doc_ids ( self ) : d = { } for s in self . _shards : for k in s . doc_index . keys ( ) : if k in d : raise KeyError ( 'doc "{i}" found in multiple repos' . format ( i = k ) ) d [ k ] = s self . _doc2shard_map = d
Assumes that the caller has the _index_lock !