def index_queryset(self, using=None):
        queryset = self.get_model().objects.public(
            status=None,
            extra_query=Q(status='P') | Q(status='S'),
            show_all_local_sites=True,
            filter_private=False)
        queryset = queryset.select_related('submitter', 'diffset_history')
        queryset = queryset.prefetch_related(
            'diffset_history__diffsets__files')

        return queryset
Index only public pending and submitted review requests.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/reviews/search_indexes.py/ReviewRequestIndex.index_queryset