Make Elasticsearch searched fields configurable

This allows fields stuch as "content" to be searchable when using Elasticsearch
Add config item ELASTICSEARCH_FIELDS, list of fields to search.
Defaults to just "name" to preserve existing behaviour
Available fields are:
- "name"
- "username"
- "content"
- "message"
This commit is contained in:
Simon Edwards 2015-07-24 13:29:24 +01:00
parent ceec6b6789
commit 8e73a32875
2 changed files with 6 additions and 3 deletions

View file

@ -99,6 +99,7 @@ SEARCH_TYPE = 'simple' # simple is not good for large wikis
# SEARCH_TYPE = 'elasticsearch'
ELASTICSEARCH_URL = 'http://127.0.0.1:9200'
ELASTICSEARCH_FIELDS = ["name"]
# SEARCH_TYPE = 'whoosh'
WHOOSH_INDEX = '/tmp/whoosh'