blob: bfa78ce7fbd1a9cc2e9f5bc0a0286519c938a3d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# -*- coding: utf-8 -*-
"""
sphinx.websupport.search.nullsearch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The default search adapter, does nothing.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from sphinx.websupport.search import BaseSearch
from sphinx.websupport.errors import NullSearchException
class NullSearch(BaseSearch):
"""A search adapter that does nothing. Used when no search adapter
is specified.
"""
def feed(self, pagename, title, doctree):
pass
def query(self, q):
raise NullSearchException('No search adapter specified.')
|