Skip to content

Commit

Permalink
added haystack conf to testing settings
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed Apr 10, 2017
1 parent 32d1169 commit 3c1e01a
Showing 1 changed file with 49 additions and 1 deletion.
50 changes: 49 additions & 1 deletion voseq/voseq/settings/testing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from .local import *
from .base import *

PHOTOS_REPOSITORY = "local"
ELASTICSEARCH = True
Expand All @@ -15,3 +15,51 @@
'NAME': 'test.db',
}
}

DB_NAME = "test"

HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': '{}_haystack'.format(DB_NAME),
'INCLUDE_SPELLING': True,
'EXCLUDED_INDEXES': [
'public_interface.search_indexes.AdvancedSearchIndex',
'public_interface.search_indexes.AutoCompleteIndex',
'public_interface.search_indexes.VouchersIndex',
],
},
'autocomplete': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': '{}_autocomplete'.format(DB_NAME),
'INCLUDE_SPELLING': False,
'EXCLUDED_INDEXES': [
'public_interface.search_indexes.SimpleSearchIndex',
'public_interface.search_indexes.VouchersIndex',
],
},
'vouchers': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': '{}_vouchers'.format(DB_NAME),
'INCLUDE_SPELLING': False,
'EXCLUDED_INDEXES': [
'public_interface.search_indexes.SimpleSearchIndex',
'public_interface.search_indexes.AdvancedSearchIndex',
'public_interface.search_indexes.AutoCompleteIndex',
],
},
'advanced_search': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': '{}_advanced_search'.format(DB_NAME),
'INCLUDE_SPELLING': False,
'EXCLUDED_INDEXES': [
'public_interface.search_indexes.SimpleSearchIndex',
'public_interface.search_indexes.VouchersIndex',
],
},
}
HAYSTACK_DEFAULT_OPERATOR = 'AND'

0 comments on commit 3c1e01a

Please sign in to comment.