code: def auto_register_search_models():
      
      for config in models_config.get_all_configs():
          if config.disable_search_index:
              continue
  
          search.register(
              config.model.objects.get_queryset(),
              ModelSearchAdapter,
              fields=config.search_fields,
              exclude=config.search_exclude_fields,
          )
docs: Auto register all search models