Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sphinx search index warning

I am getting this warning in Sphinx:

WARNING: search index couldn't be loaded, but not all documents will be built: the index will be incomplete.

But as far as I can tell, it built the documentation just fine including the search index.

What does that error message actually mean and how to fix it?

Note from answer: the current invocation is sphinx-build -W -n docs/ docs/html *.rst.

like image 228
Sardathrion - against SE abuse Avatar asked Sep 02 '25 10:09

Sardathrion - against SE abuse


1 Answers

The error message is from here:

https://bitbucket.org/birkenfeld/sphinx/src/ef3092d458cc00c4b74dd342ea05ba1059a5da70/sphinx/builders/html.py?at=default#cl-664

My guess is that your search index is actually incomplete, but not in an obvious way. If you build all documents with -E, you might get something more useful. Apart from that, try building to a fresh output directory; the error could be because of bad permissions on your current index file.

The underlying issue is that, somehow or another, the indexer can't load the previously-generated file, and isn't rebuilding the entire doctree, and so expects that the files it's not rebuilding won't be present in the search index when it's done. Try various combos of -E and -W (actually, your current sphinx invocation cmdline would be helpful) to hopefully get something more descriptive.

like image 196
AdamKG Avatar answered Sep 04 '25 23:09

AdamKG