.oO SearXNG Developer Documentation Oo.
|
Functions | |
init (_) | |
connect () | |
search (query, params) | |
Variables | |
str | engine_type = 'offline' |
str | host = '127.0.0.1' |
int | port = 27017 |
str | username = '' |
str | password = '' |
database = None | |
collection = None | |
key = None | |
bool | paging = True |
int | results_per_page = 20 |
bool | exact_match_only = False |
str | result_template = 'key-value.html' |
_client = None | |
MongoDB_ is a document based database program that handles JSON like data. Before configuring the ``mongodb`` engine, you must install the dependency pymongo_. Configuration ============= In order to query MongoDB_, you have to select a ``database`` and a ``collection``. Furthermore, you have to select a ``key`` that is going to be searched. MongoDB_ also supports the option ``exact_match_only``, so configure it as you wish. Example ======= Below is an example configuration for using a MongoDB collection: .. code:: yaml # MongoDB engine # Required dependency: pymongo - name: mymongo engine: mongodb shortcut: md exact_match_only: false host: '127.0.0.1' port: 27017 enable_http: true results_per_page: 20 database: 'business' collection: 'reviews' # name of the db collection key: 'name' # key in the collection to search for Implementations ===============
searx.engines.mongodb.connect | ( | ) |
Definition at line 75 of file mongodb.py.
Referenced by searx.engines.mongodb.init().
searx.engines.mongodb.init | ( | _ | ) |
Definition at line 71 of file mongodb.py.
References searx.engines.mongodb.connect().
searx.engines.mongodb.search | ( | query, | |
params ) |
Definition at line 85 of file mongodb.py.
References searx.format.
|
protected |
Definition at line 68 of file mongodb.py.
searx.engines.mongodb.collection = None |
Definition at line 59 of file mongodb.py.
searx.engines.mongodb.database = None |
Definition at line 58 of file mongodb.py.
str searx.engines.mongodb.engine_type = 'offline' |
Definition at line 51 of file mongodb.py.
bool searx.engines.mongodb.exact_match_only = False |
Definition at line 65 of file mongodb.py.
str searx.engines.mongodb.host = '127.0.0.1' |
Definition at line 54 of file mongodb.py.
searx.engines.mongodb.key = None |
Definition at line 60 of file mongodb.py.
bool searx.engines.mongodb.paging = True |
Definition at line 63 of file mongodb.py.
str searx.engines.mongodb.password = '' |
Definition at line 57 of file mongodb.py.
int searx.engines.mongodb.port = 27017 |
Definition at line 55 of file mongodb.py.
str searx.engines.mongodb.result_template = 'key-value.html' |
Definition at line 66 of file mongodb.py.
int searx.engines.mongodb.results_per_page = 20 |
Definition at line 64 of file mongodb.py.
str searx.engines.mongodb.username = '' |
Definition at line 56 of file mongodb.py.