def search(self, document_class=None, ids_only=False):
        document_class = document_class or self.document_class
        if not document_class:
            raise DocumentClassRequiredError(
                u"A document class must be provided to instantiate with query "
                "results. Either instantiate the index object with one, or "
                "pass one to the search method."
            )

        return SearchQuery(
            self._index,
            document_class=document_class,
            ids_only=ids_only
        )
#24958 - Variant of test_inlineformset_factory_nulls_default_pks for
dataset/ETHPy150Open potatolondon/search/search/indexes.py/Index.search--crossover with--dataset/ETHPy150Open django/django/tests/model_formsets/test_uuid.py/InlineFormsetTests.test_inlineformset_factory_nulls_default_pks_uuid_parent_auto_child