Skip to content

Commit ab0b1bb

Browse files
authored
Merge pull request #4689 from safwanrahman/tune
Tuning elasticsearch shard and replica
2 parents 2c7b03c + 51c109b commit ab0b1bb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

readthedocs/search/documents.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class ProjectDocument(RTDDocTypeMixin, DocType):
2121
class Meta(object):
2222
model = Project
2323
fields = ('name', 'slug', 'description')
24+
auto_refresh = False
2425

2526
url = fields.TextField(attr='get_absolute_url')
2627
users = fields.NestedField(properties={
@@ -52,6 +53,7 @@ class Meta(object):
5253
model = HTMLFile
5354
fields = ('commit',)
5455
ignore_signals = settings.ES_PAGE_IGNORE_SIGNALS
56+
auto_refresh = False
5557

5658
project = fields.KeywordField(attr='project.slug')
5759
version = fields.KeywordField(attr='version.slug')

readthedocs/settings/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,14 @@ def USE_PROMOS(self): # noqa
349349
'project': {
350350
'name': 'project_index',
351351
'settings': {'number_of_shards': 5,
352-
'number_of_replicas': 0
352+
'number_of_replicas': 1
353353
}
354354
},
355355
'page': {
356356
'name': 'page_index',
357357
'settings': {
358358
'number_of_shards': 5,
359-
'number_of_replicas': 0,
359+
'number_of_replicas': 1,
360360
}
361361
},
362362
}

0 commit comments

Comments
 (0)