'Only return instances of this document and not any inherited documents'

def no_sub_classes(self):

    if (self._document._meta.get('allow_inheritance') is True):
        self._initial_query = {'_cls': self._document._class_name}
    return self
