code: def index_queryset(self, using=None):
          
  
          kwargs = {"active": True}
  
          # if permissions are enabled then we want only public pages
          # https://github.com/leonardo-modules/leonardo-module-pagepermissions
          if hasattr(Page(), 'permissions'):
              kwargs['permissions__isnull'] = True
  
          # https://github.com/leonardo-modules/leonardo-page-search
          if hasattr(Page(), 'search_exclude'):
              kwargs['search_exclude'] = False
  
          return self.get_model().objects.filter(**kwargs)
docs: Used when the entire index for model is updated.