disable search index generation

70 views
Skip to first unread message

Andrea Cassioli

unread,
Mar 20, 2016, 5:26:14 PM3/20/16
to sphinx-users
Hi,
I have removed the search box from my documentation. But I think the search index is still generated. Indeed I see the files `search.html` `searchindex.js` are still included.

Is there any options I can set to completely disable the search index?

stap...@stappers.it

unread,
Jun 26, 2016, 5:28:13 PM6/26/16
to sphinx-users


Op zondag 20 maart 2016 22:26:14 UTC+1 schreef Andrea Cassioli:
Hi,
I have removed the search box from my documentation. But I think the search index is still generated. Indeed I see the files `search.html` `searchindex.js` are still included.

Is there any options I can set to completely disable the search index?

FWIW,  I have the same question.
So your answer would help at least two people.


Cheers
Geert Stappers
Who got too many hits on 'sphinx no search'  websearch to 'sphinx-search'   :-/

Komiya Takeshi

unread,
Jun 27, 2016, 5:58:06 AM6/27/16
to sphinx-users
Hi,

There is no way to disable the feature in the proper way.

As a workaround, the following code is able to do that.

def on_builder_inited(app):
    if app.builder.name == 'html':
        app.builder.search = False


def setup(app):
    app.connect('builder-inited', on_builder_inited)


This is unofficial way. So I can't promiss you this works in future version. 
Please use this if you are okay to such a adhoc way.

Thanks,
Takeshi KOMIYA

2016年6月27日月曜日 6時28分13秒 UTC+9 stap...@stappers.it:
Reply all
Reply to author
Forward
0 new messages