We have a model with plenty of nested relations that are used in search. Indexing a single item is still pretty fast but buildwatson takes long because we can't prefetch the relations. It would be nice if buildwatson supported
- some way to specify a custom queryset instead of
model_._default_manager.all() (so we can use queryset.prefetch_related()
- custom queryset iterator chunk size in
iter_search_entries() (chunk_size needs to be explicitly defined or prefetch_related won't have any effect on iterator)
So far the only option seems to be to monkey patch rebuild_index_for_model but I feel dirty duplicating a 50-line function.