Skip to content

Commit

Permalink
optimize for elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
safwanrahman committed Nov 16, 2018
1 parent 57c7b57 commit 536874e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,23 @@ def USE_PROMOS(self): # noqa
ES_INDEXES = {
'project': {
'name': 'project_index',
'settings': {'number_of_shards': 5,
'settings': {'number_of_shards': 1,
'number_of_replicas': 1
}
},
'page': {
'name': 'page_index',
'settings': {
'number_of_shards': 5,
'number_of_replicas': 1,
'number_of_shards': 3,
'number_of_replicas': 3,
"index": {
"sort.field": ["project", "version"]
}
}
},
}
# Disable auto refresh for increasing index performance
ELASTICSEARCH_DSL_AUTO_REFRESH = False

ALLOWED_HOSTS = ['*']

Expand Down
1 change: 1 addition & 0 deletions readthedocs/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class CommunityTestSettings(CommunityDevSettings):
TEMPLATE_DEBUG = False
ES_PAGE_IGNORE_SIGNALS = False
ELASTICSEARCH_DSL_AUTOSYNC = False
ELASTICSEARCH_DSL_AUTO_REFRESH = False

@property
def ES_INDEXES(self): # noqa - avoid pep8 N802
Expand Down

0 comments on commit 536874e

Please sign in to comment.