uWSGI config and bugfix with file extensions

This commit is contained in:
Simon
2018-06-13 14:11:27 -04:00
parent e91572a06f
commit 9bde8cb629
10 changed files with 104 additions and 38 deletions

View File

@@ -74,8 +74,8 @@ class ElasticSearchEngine(SearchEngine):
# Mappings
self.es.indices.put_mapping(body={"properties": {
"path": {"analyzer": "my_nGram", "type": "text"},
"name": {"analyzer": "my_nGram", "type": "text"},
"path": {"analyzer": "standard", "type": "text"},
"name": {"analyzer": "standard", "type": "text", "fields": {"nGram": {"type": "text", "analyzer": "my_nGram"}}},
"mtime": {"type": "date", "format": "epoch_millis"},
"size": {"type": "long"},
"website_id": {"type": "integer"},
@@ -95,7 +95,7 @@ class ElasticSearchEngine(SearchEngine):
if not in_str:
return
import_every = 1000
import_every = 5000
docs = []
@@ -138,8 +138,8 @@ class ElasticSearchEngine(SearchEngine):
"must": {
"multi_match": {
"query": query,
"fields": ["name", "path"],
"operator": "and"
"fields": ["name^5", "name.nGram^2", "path"],
"operator": "or"
}
},
"filter": filters