Query more of your NoSQL stores¶
From now on, searx lets you to query your NoSQL data stores:
The reference configuration of the engines are included settings.yml
just commented out,
as you have to set various options and install dependencies before using them.
By default, the engines use key-value
template for displaying results.
If you are not satisfied with the original result layout,
you can use your owm template by placing the template under
searx/templates/{theme_name}/result_templates/{template_name}
and setting
result_template
attribute to {template_name}
.
Furthermore, if you do not want to expose these engines on a public instance, you can
still add them and limit the access by setting tokens
as described in the blog post about
private engines.
Configuring searx to use the stores¶
NoSQL data stores are used for storing arbitrary data without first defining their structure.
Redis¶
Required package: redis
Redis is a key value based data store usually stored in memory.
Select a database to search in and set its index in the option db
. You can
either look for exact matches or use partial keywords to find what you are looking for
by configuring exact_match_only
.
In this example you can search for exact matches in your first database:
- name : mystore
engine : redis_server
exact_match_only : True
host : 127.0.0.1
port : 6379
password : secret-password
db : 0
shortcut : rds
enable_http : True
MongoDB¶
Required package: pymongo
MongoDB is a document based database program that handles JSON like data.
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.
Above is an example configuration for using a MongoDB collection:
- name : mymongo
engine : mongodb
shortcut : md
host : '127.0.0.1'
port : 27017
database : personal
collection : income
key : month
enable_http: True
Acknowledgement¶
This development was sponsored by Search and Discovery Fund of NLnet Foundation .