From 59b97f8a6b0c0c7356739c2d709731d4d93f7e3d Mon Sep 17 00:00:00 2001 From: mathieu Date: Mon, 11 Apr 2016 10:46:58 +0200 Subject: [PATCH] Remove custom backend Former-commit-id: c27ef4ef566418e76bf2ba4689df1eaac1939d28 --- app/deploy/app.sh | 2 +- app/sandbox/settings.py | 2 +- data/backup/b57a9339fe.sql.REMOVED.git-id | 1 + env/build.yml | 4 ++-- telemeta/util/backend.py | 13 ------------- 5 files changed, 5 insertions(+), 17 deletions(-) create mode 100644 data/backup/b57a9339fe.sql.REMOVED.git-id delete mode 100644 telemeta/util/backend.py diff --git a/app/deploy/app.sh b/app/deploy/app.sh index 6a95a0b2..3ae84860 100644 --- a/app/deploy/app.sh +++ b/app/deploy/app.sh @@ -34,7 +34,7 @@ python $manage collectstatic --noinput python $manage telemeta-create-admin-user python $manage telemeta-create-boilerplate -if [ $REINDEX = "True"] +if [ $REINDEX = "True" ] then python $manage rebuild_index --noinput fi diff --git a/app/sandbox/settings.py b/app/sandbox/settings.py index 080ccb03..c31f79c7 100644 --- a/app/sandbox/settings.py +++ b/app/sandbox/settings.py @@ -302,7 +302,7 @@ from worker import app HAYSTACK_CONNECTIONS = { 'default': { - 'ENGINE': 'telemeta.util.backend.CustomElasticEngine', + 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', 'URL': 'http://search:9200/', 'INDEX_NAME': 'haystack', 'INLUDE_SPELLING': True, diff --git a/data/backup/b57a9339fe.sql.REMOVED.git-id b/data/backup/b57a9339fe.sql.REMOVED.git-id new file mode 100644 index 00000000..87a6ff2d --- /dev/null +++ b/data/backup/b57a9339fe.sql.REMOVED.git-id @@ -0,0 +1 @@ +3a6f83feeb737d406aea74e03ae989969a5af9ff \ No newline at end of file diff --git a/env/build.yml b/env/build.yml index b37a2aa2..859a32b6 100644 --- a/env/build.yml +++ b/env/build.yml @@ -22,5 +22,5 @@ # Thomas Fillon app: - env_file: - ./index.env + env_file: + env/index.env diff --git a/telemeta/util/backend.py b/telemeta/util/backend.py deleted file mode 100644 index 8c882536..00000000 --- a/telemeta/util/backend.py +++ /dev/null @@ -1,13 +0,0 @@ -from haystack.backends.elasticsearch_backend import * - -class CustomElasticBackend(ElasticsearchSearchBackend): - - def setup(self): - FIELD_MAPPINGS.get('edge_ngram')['search_analyzer']="standard"; - FIELD_MAPPINGS.get('ngram')['search_analyzer']="standard"; - eb = super(CustomElasticBackend, self) - eb.DEFAULT_SETTINGS.get('settings').get('analysis').get('filter').get('haystack_ngram')['max_gram']=30 - eb.setup() - -class CustomElasticEngine(ElasticsearchSearchEngine): - backend = CustomElasticBackend \ No newline at end of file -- 2.39.5