Skip to content

Commit

Permalink
[#2844] actually use simple-search config option
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 13, 2012
1 parent abf6adb commit 873f03d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ckan/config/environment.py
Expand Up @@ -16,7 +16,6 @@
import ckan.model as model
import ckan.plugins as p
import ckan.lib.helpers as h
import ckan.lib.search as search
import ckan.lib.app_globals as app_globals

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -161,6 +160,9 @@ def find_controller(self, controller):

# Init SOLR settings and check if the schema is compatible
#from ckan.lib.search import SolrSettings, check_solr_schema_version

# lib.search is imported here as we need the config enabled and parsed
import ckan.lib.search as search
search.SolrSettings.init(config.get('solr_url'),
config.get('solr_user'),
config.get('solr_password'))
Expand Down
3 changes: 2 additions & 1 deletion ckan/lib/search/__init__.py
@@ -1,5 +1,6 @@
import logging
from pylons import config, c
from paste.deploy.converters import asbool

from ckan import model
from ckan.plugins import SingletonPlugin, implements, IDomainObjectModification
Expand Down Expand Up @@ -27,7 +28,7 @@ def text_traceback():
).strip()
return res

SIMPLE_SEARCH = config.get('ckan.simple_search', False)
SIMPLE_SEARCH = asbool(config.get('ckan.simple_search', False))

SUPPORTED_SCHEMA_VERSIONS = ['1.4']

Expand Down

0 comments on commit 873f03d

Please sign in to comment.