File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class Meta(object):
59
59
title = fields .TextField (attr = 'processed_json.title' )
60
60
headers = fields .TextField (attr = 'processed_json.headers' )
61
61
content = fields .TextField (attr = 'processed_json.content' )
62
- path = fields .TextField (attr = 'processed_json.path' )
62
+ path = fields .KeywordField (attr = 'processed_json.path' )
63
63
64
64
# Fields to perform search with weight
65
65
search_fields = ['title^10' , 'headers^5' , 'content' ]
Original file line number Diff line number Diff line change @@ -343,13 +343,19 @@ def USE_PROMOS(self): # noqa
343
343
ES_INDEXES = {
344
344
'project' : {
345
345
'name' : 'project_index' ,
346
+ # We do not have much data in the project node, therefore only 1 shard with
347
+ # 1 replica is appropriate project index
346
348
'settings' : {'number_of_shards' : 1 ,
347
349
'number_of_replicas' : 1
348
350
}
349
351
},
350
352
'page' : {
351
353
'name' : 'page_index' ,
352
354
'settings' : {
355
+ # We have 3 nodes, therefore having 3 shards and each one having 3 replica
356
+ # will be good fit for our infrastructure. So all the 9(3*3) shards will be
357
+ # allocated to 3 nodes. Therefore, if one nodes get failed, the data will be
358
+ # inside other nodes and Elasticsearch can serve properly.
353
359
'number_of_shards' : 3 ,
354
360
'number_of_replicas' : 3 ,
355
361
"index" : {
You can’t perform that action at this time.
0 commit comments