code: def register(self, cls):
          
          doc_type = cls.search_objects.mapping.doc_type
  
          self.all_models[doc_type] = cls
          base_class = cls.get_base_class()
          if base_class not in self.families:
              self.families[base_class] = {}
          self.families[base_class][doc_type] = cls
  
          if cls.search_objects.mapping.index not in self.indexes:
              self.indexes[cls.search_objects.mapping.index] = []
  
          self.indexes[cls.search_objects.mapping.index].append(cls)
docs: Adds a new PolymorphicIndexable to the registry.