dh_sphinxdoc looks for either the new way of loading searchindex.js:
<script src="searchindex.js" defer></script>
or the old way:
jQuery(function() { Search.loadIndex("searchindex.js"); });
Looking at openstackdocstheme's search.html, it does have one of these
lines (the second one):
https://opendev.org/openstack/openstackdocstheme/src/tag/3.2.0/openstackdocstheme/theme/openstackdocs/search.html#L38
If it's there but dh_sphinxdoc still shows this error, then it's probably a
dh_sphinxdoc bug. Otherwise, please figure out why that line is not there.