-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.py.sample
45 lines (42 loc) · 1.58 KB
/
local.py.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from addok.config.default import INDEXERS_PYPATHS
LOG_QUERIES = False
LOG_NOT_FOUND = False
FIELDS = [
{'key': 'name', 'boost': 4, 'null': False},
{'key': 'code'},
{'key': 'postal',
'boost': lambda doc: 1.2 if doc.get('level') == 'fr:commune' else 1},
]
FILTERS = ['level']
QUERY_PROCESSORS_PYPATHS = []
SEARCH_RESULT_PROCESSORS_PYPATHS = [
'addok_geozones.utils.make_labels',
'addok.helpers.results.score_by_importance',
'addok.helpers.results.score_by_autocomplete_distance',
'addok.helpers.results.score_by_ngram_distance',
'addok.helpers.results.score_by_geo_distance',
'addok_geozones.utils.follow_successor',
]
PROCESSORS_PYPATHS = [
'addok.helpers.text.tokenize',
'addok.helpers.text.normalize',
'addok.helpers.text.synonymize',
'addok_trigrams.trigramize',
]
RESULTS_COLLECTORS_PYPATHS = [
'addok.helpers.collectors.only_commons',
'addok.helpers.collectors.bucket_with_meaningful',
'addok.helpers.collectors.reduce_with_other_commons',
'addok.helpers.collectors.ensure_geohash_results_are_included_if_center_is_given', # noqa
'addok_trigrams.extend_results_removing_numbers',
'addok_trigrams.extend_results_removing_one_whole_word',
'addok_trigrams.extend_results_removing_successive_trigrams',
]
BATCH_PROCESSORS_PYPATHS = [
'addok_geozones.utils.prepare_document',
'addok.ds.store_documents',
'addok.helpers.index.index_documents',
]
BATCH_FILE_LOADER_PYPATH = 'addok.helpers.load_msgpack_file'
INDEXERS_PYPATHS.remove('addok.pairs.PairsIndexer')
INDEXERS_PYPATHS.remove('addok.autocomplete.EdgeNgramIndexer')