[ckan-changes] commit/ckan: 4 new changesets

Bitbucket commits-noreply at bitbucket.org
Mon Sep 26 15:52:52 UTC 2011


4 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/babdf25b52c5/
changeset:   babdf25b52c5
user:        dread
date:        2011-09-26 17:42:01
summary:     [lib/search][s]: Better error message when solr not installed.
affected #:  1 file (-1 bytes)

--- a/ckan/lib/search/index.py	Mon Sep 26 13:45:15 2011 +0100
+++ b/ckan/lib/search/index.py	Mon Sep 26 16:42:01 2011 +0100
@@ -1,8 +1,13 @@
+import socket
+import string
+import logging
+import itertools
+
 from pylons import config
-import itertools
-import string
+from solr import SolrException
+
 from common import SearchIndexError, make_connection
-import logging
+
 log = logging.getLogger(__name__)
 
 TYPE_FIELD = "entity_type"
@@ -25,6 +30,9 @@
     try:
         conn.delete_query(query)
         conn.commit()
+    except socket.error, e:
+        log.error('Could not connect to SOLR: %r' % e)
+        raise
     finally:
         conn.close()
 


http://bitbucket.org/okfn/ckan/changeset/343c0951c5ab/
changeset:   343c0951c5ab
user:        dread
date:        2011-09-26 17:43:08
summary:     [lib/search][xs]: Quick type check in search params.
affected #:  1 file (-1 bytes)

--- a/ckan/lib/search/query.py	Mon Sep 26 16:42:01 2011 +0100
+++ b/ckan/lib/search/query.py	Mon Sep 26 16:43:08 2011 +0100
@@ -173,6 +173,8 @@
         return [r.get('id') for r in data.results]
 
     def run(self, query):
+        assert isinstance(query, dict)
+        
         # check that query keys are valid
         if not set(query.keys()) <= VALID_SOLR_PARAMETERS:
             invalid_params = [s for s in set(query.keys()) - VALID_SOLR_PARAMETERS]


http://bitbucket.org/okfn/ckan/changeset/d11b4ffe922b/
changeset:   d11b4ffe922b
user:        dread
date:        2011-09-26 17:43:37
summary:     [templates][xs]: Cope with plugins not being set at all (older instances).
affected #:  1 file (-1 bytes)

--- a/ckan/templates/layout_base.html	Mon Sep 26 16:43:08 2011 +0100
+++ b/ckan/templates/layout_base.html	Mon Sep 26 16:43:37 2011 +0100
@@ -228,7 +228,7 @@
   <script type="text/javascript">
     CKAN.plugins = [ 
       // Declare js array from Python string
-      ${['\'%s\', '%s  for s in config['ckan.plugins'].split(' ')]}
+      ${['\'%s\', '%s  for s in config.get('ckan.plugins','').split(' ')]}
     ];
     $(document).ready(function() {
         var ckan_user = $.cookie("ckan_display_name");


http://bitbucket.org/okfn/ckan/changeset/449cf678243a/
changeset:   449cf678243a
user:        dread
date:        2011-09-26 17:44:22
summary:     [doc][s]: Default SOLR port changed to avoid common conflicts on port 8080.
affected #:  1 file (-1 bytes)

--- a/doc/install-from-source.rst	Mon Sep 26 16:43:37 2011 +0100
+++ b/doc/install-from-source.rst	Mon Sep 26 16:44:22 2011 +0100
@@ -248,9 +248,12 @@
 
        NO_START=0            # (line 4)
        JETTY_HOST=127.0.0.1  # (line 15)
+       JETTY_PORT=8983       # (line 18)
 
    Then create a symlink from the schema.xml file in your ckan config
-   directory to the solr config directory:
+   directory to the solr config directory. 
+
+.. note:: The first reference to schema.xml will probably need to be to be correct for your system.NB it must be an absolute path):
 
    ::
     
@@ -261,7 +264,7 @@
    ::
 
        ckan.site_id=my_ckan_instance
-       solr_url=http://127.0.0.1:8080/solr
+       solr_url=http://127.0.0.1:8983/solr
 
    You should now be able to start solr:
 
@@ -269,9 +272,12 @@
 
        sudo service jetty start
 
+   Now you should check SOLR is running ok by browsing: http://localhost:8983/solr/
+
    For more information on Solr setup and configuration, see the CKAN wiki:
    http://wiki.ckan.net/Solr_Search
 
+
 10. Run the CKAN webserver.
 
   NB If you've started a new shell, you'll have to activate the environment

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list