incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [5/6] git commit: [#5697] Consolidated Solr search error handling
Date Tue, 29 Jan 2013 21:09:44 GMT
[#5697] Consolidated Solr search error handling

Signed-off-by: Cory Johns <johnsca@geek.net>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/fad9e0c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/fad9e0c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/fad9e0c8

Branch: refs/heads/master
Commit: fad9e0c8b98fd7c43c07d6c71df5a00f0fecd49c
Parents: 4b8a3fe
Author: Cory Johns <johnsca@geek.net>
Authored: Tue Jan 29 19:21:22 2013 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Tue Jan 29 20:37:02 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/search.py                        |   21 ++++++------
 Allura/allura/lib/solr.py                          |    1 +
 Allura/allura/lib/widgets/search.py                |    3 +-
 .../allura/templates/widgets/search_results.html   |    3 ++
 ForgeBlog/forgeblog/main.py                        |   25 ++++++++------
 ForgeBlog/forgeblog/templates/blog/search.html     |    4 ++-
 ForgeChat/forgechat/main.py                        |   23 ++++++++-----
 ForgeChat/forgechat/templates/chat/search.html     |    4 ++-
 .../forgediscussion/controllers/root.py            |   26 +++++++++------
 .../templates/discussionforums/search.html         |    4 +-
 ForgeShortUrl/forgeshorturl/main.py                |   10 ++++--
 ForgeShortUrl/forgeshorturl/templates/search.html  |    2 +-
 ForgeTracker/forgetracker/model/ticket.py          |    6 ++--
 .../forgetracker/tests/functional/test_root.py     |    3 +-
 ForgeTracker/forgetracker/tracker_main.py          |    6 ++--
 ForgeWiki/forgewiki/templates/wiki/search.html     |    2 +-
 ForgeWiki/forgewiki/wiki_main.py                   |   23 ++++++++-----
 17 files changed, 101 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/Allura/allura/lib/search.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index dc86b30..db0118e 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -1,4 +1,5 @@
 import re
+import socket
 import cPickle as pickle
 from logging import getLogger
 from pprint import pformat
@@ -6,7 +7,7 @@ from itertools import islice, chain
 
 import markdown
 from pylons import c,g
-import pysolr
+from pysolr import SolrError
 
 from . import helpers as h
 from .markdown_extensions import ForgeExtension
@@ -26,14 +27,20 @@ def solarize(obj):
     doc['text'] = text
     return doc
 
-def search(q,short_timeout=False,**kw):
+class SearchError(SolrError):
+    pass
+
+def search(q,short_timeout=False,ignore_errors=True,**kw):
     try:
         if short_timeout:
             return g.solr_short_timeout.search(q, **kw)
         else:
             return g.solr.search(q, **kw)
-    except pysolr.SolrError as e:
+    except (SolrError, socket.error) as e:
         log.exception('Error in solr indexing')
+        if not ignore_errors:
+            match = re.search(r'<pre>(.*)</pre>', str(e))
+            raise SearchError('Error running search query: %s' % (match.group(1) if match
else e))
 
 def search_artifact(atype, q, history=False, rows=10, short_timeout=False, **kw):
     """Performs SOLR search.
@@ -52,13 +59,7 @@ def search_artifact(atype, q, history=False, rows=10, short_timeout=False,
**kw)
         'mount_point_s:%s' % c.app.config.options.mount_point ]
     if not history:
         fq.append('is_history_b:False')
-    try:
-        if short_timeout:
-            return g.solr_short_timeout.search(q, fq=fq, rows=rows, **kw)
-        else:
-            return g.solr.search(q, fq=fq, rows=rows, **kw)
-    except pysolr.SolrError, e:
-        raise ValueError('Error running search query: %s' % e.message)
+    return search(q, fq=fq, rows=rows, short_timeout=short_timeout, ignore_errors=False,
**kw)
 
 def find_shortlinks(text):
     md = markdown.Markdown(

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/Allura/allura/lib/solr.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/solr.py b/Allura/allura/lib/solr.py
index b777dc6..8d56022 100644
--- a/Allura/allura/lib/solr.py
+++ b/Allura/allura/lib/solr.py
@@ -1,5 +1,6 @@
 import shlex
 import pysolr
+from pysolr import SolrError
 
 
 class Solr(pysolr.Solr):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/Allura/allura/lib/widgets/search.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/search.py b/Allura/allura/lib/widgets/search.py
index 98a5aad..ec6ed51 100644
--- a/Allura/allura/lib/widgets/search.py
+++ b/Allura/allura/lib/widgets/search.py
@@ -10,7 +10,8 @@ class SearchResults(ew_core.Widget):
         results=None,
         limit=None,
         page=0,
-        count=0)
+        count=0,
+        search_error=None)
 
     class fields(ew_core.NameList):
         page_list=ffw.PageList()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/Allura/allura/templates/widgets/search_results.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/search_results.html b/Allura/allura/templates/widgets/search_results.html
index 2329cc6..3e51c43 100644
--- a/Allura/allura/templates/widgets/search_results.html
+++ b/Allura/allura/templates/widgets/search_results.html
@@ -11,6 +11,9 @@
   </div>
 </form>
 <div style="clear:both">&nbsp;</div>
+{% if search_error %}
+<div class="grid-19">{{ search_error }}</div>
+{% endif %}
 <div class="grid-19">
   {{widget.fields['page_list'].display(limit=limit, page=page, count=count)}}
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeBlog/forgeblog/main.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/main.py b/ForgeBlog/forgeblog/main.py
index 4a7bfe8..9981317 100644
--- a/ForgeBlog/forgeblog/main.py
+++ b/ForgeBlog/forgeblog/main.py
@@ -20,7 +20,7 @@ from ming.orm import session
 from allura.app import Application, ConfigOption, SitemapEntry
 from allura.app import DefaultAdminController
 from allura.lib import helpers as h
-from allura.lib.search import search
+from allura.lib.search import search, SearchError
 from allura.lib.decorators import require_post, Property
 from allura.lib.security import has_access, require_access
 from allura.lib import widgets as w
@@ -191,20 +191,25 @@ class RootController(BaseController):
     def search(self, q=None, history=None, **kw):
         'local tool search'
         results = []
+        search_error = None
         count=0
         if not q:
             q = ''
         else:
-            results = search(
-                q,
-                fq=[
-                    'state_s:published',
-                    'is_history_b:%s' % history,
-                    'project_id_s:%s' % c.project._id,
-                    'mount_point_s:%s'% c.app.config.options.mount_point ],
-                short_timeout=True)
+            try:
+                results = search(
+                    q,
+                    fq=[
+                        'state_s:published',
+                        'is_history_b:%s' % history,
+                        'project_id_s:%s' % c.project._id,
+                        'mount_point_s:%s'% c.app.config.options.mount_point ],
+                    short_timeout=True,
+                    ignore_errors=False)
+            except SearchError as e:
+                search_error = e
             if results: count=results.hits
-        return dict(q=q, history=history, results=results or [], count=count)
+        return dict(q=q, history=history, results=results or [], count=count, search_error=search_error)
 
     @expose('jinja:forgeblog:templates/blog/edit_post.html')
     @without_trailing_slash

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeBlog/forgeblog/templates/blog/search.html
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/templates/blog/search.html b/ForgeBlog/forgeblog/templates/blog/search.html
index bcc35f0..a4f7129 100644
--- a/ForgeBlog/forgeblog/templates/blog/search.html
+++ b/ForgeBlog/forgeblog/templates/blog/search.html
@@ -11,7 +11,9 @@
     <input type="submit" value="Search"/>
   </form>
   <div style="clear: both">&nbsp;</div>
-  {% if count==0 and q %}
+  {% if search_error %}
+  <p>{{ search_error }}</p>
+  {% elif count==0 and q %}
   <p>No results.</p>
   {% elif count==1 and q %}
   <p>{{count}} result.</p>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeChat/forgechat/main.py
----------------------------------------------------------------------
diff --git a/ForgeChat/forgechat/main.py b/ForgeChat/forgechat/main.py
index f5b1f6f..757d220 100644
--- a/ForgeChat/forgechat/main.py
+++ b/ForgeChat/forgechat/main.py
@@ -14,7 +14,7 @@ from formencode import validators
 # Pyforge-specific imports
 from allura.app import Application, ConfigOption, SitemapEntry, DefaultAdminController
 from allura.lib import helpers as h
-from allura.lib.search import search
+from allura.lib.search import search, SearchError
 from allura.lib.decorators import require_post
 from allura.lib.security import require_access
 from allura import model as M
@@ -123,19 +123,24 @@ class RootController(BaseController):
     def search(self, q=None, history=None, **kw):
         'local tool search'
         results = []
+        search_error = None
         count=0
         if not q:
             q = ''
         else:
-            results = search(
-                q,
-                fq=[
-                    'is_history_b:%s' % history,
-                    'project_id_s:%s' % c.project._id,
-                    'mount_point_s:%s'% c.app.config.options.mount_point ],
-                short_timeout=True)
+            try:
+                results = search(
+                    q,
+                    fq=[
+                        'is_history_b:%s' % history,
+                        'project_id_s:%s' % c.project._id,
+                        'mount_point_s:%s'% c.app.config.options.mount_point ],
+                    short_timeout=True,
+                    ignore_errors=False)
+            except SearchError as e:
+                search_error = e
             if results: count=results.hits
-        return dict(q=q, history=history, results=results or [], count=count)
+        return dict(q=q, history=history, results=results or [], count=count, search_error=search_error)
 
     @expose()
     def _lookup(self, y, m, d, *rest):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeChat/forgechat/templates/chat/search.html
----------------------------------------------------------------------
diff --git a/ForgeChat/forgechat/templates/chat/search.html b/ForgeChat/forgechat/templates/chat/search.html
index 1735cac..debc1ec 100644
--- a/ForgeChat/forgechat/templates/chat/search.html
+++ b/ForgeChat/forgechat/templates/chat/search.html
@@ -12,7 +12,9 @@
     Search history? <input type="checkbox" name="history" {% if history %}checked="checked"{%
endif %}/><br/>
     <input type="submit" value="Search"/>
   </form>
-  {% if count==0 and q %}
+  {% if search_error %}
+    <p>{{ search_error }}</p>
+  {% elif count==0 and q %}
     <p>No results.</p>
   {% elif count==1 and q %}
     <p>{{count}} result.</p>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeDiscussion/forgediscussion/controllers/root.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py
index 8bc3627..5420ef2 100644
--- a/ForgeDiscussion/forgediscussion/controllers/root.py
+++ b/ForgeDiscussion/forgediscussion/controllers/root.py
@@ -1,3 +1,4 @@
+import re
 import json
 import logging
 import pymongo
@@ -15,7 +16,7 @@ from webob import exc
 
 from allura.lib.security import require_access, has_access, require_authenticated
 from allura.model import Feed
-from allura.lib.search import search
+from allura.lib.search import search, SearchError
 from allura.lib import helpers as h
 from allura.lib.utils import AntiSpam
 from allura.lib.decorators import require_post
@@ -119,19 +120,24 @@ class RootController(BaseController, DispatchIndex):
         if project:
             redirect(c.project.url() + 'search?' + urlencode(dict(q=q, history=history)))
         results = []
+        search_error = None
         count=0
         limit, page, start = g.handle_paging(limit, page, default=25)
         if not q:
             q = ''
         else:
-            results = search(
-                q, rows=limit, start=start,
-                fq=[
-                    'is_history_b:%s' % history,
-                    'project_id_s:%s' % c.project._id,
-                    'mount_point_s:%s'% c.app.config.options.mount_point,
-                    '-deleted_b:true'],
-                short_timeout=True)
+            try:
+                results = search(
+                    q, rows=limit, start=start,
+                    fq=[
+                        'is_history_b:%s' % history,
+                        'project_id_s:%s' % c.project._id,
+                        'mount_point_s:%s'% c.app.config.options.mount_point,
+                        '-deleted_b:true'],
+                    short_timeout=True,
+                    ignore_errors=False)
+            except SearchError as e:
+                search_error = e
             if results: count=results.hits
         c.search_results = self.W.search_results
         if results is not None:
@@ -142,7 +148,7 @@ class RootController(BaseController, DispatchIndex):
                     p = model.ForumPost.query.get(_id=_id)
                     doc['url_paginated'] = p.url_paginated()
         return dict(q=q, history=history, results=results or [],
-                    count=count, limit=limit, page=page)
+                    count=count, limit=limit, page=page, search_error=search_error)
 
     @expose('jinja:allura:templates/markdown_syntax.html')
     def markdown_syntax(self):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html b/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
index 5976c24..b8aa218 100644
--- a/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/search.html
@@ -6,5 +6,5 @@
 
 {% block content %}
   {{c.search_results.display(results=results,q=q,history=history,
-                             count=count,limit=limit,page=page)}}
-{% endblock %}
\ No newline at end of file
+                             count=count,limit=limit,page=page,search_error=search_error)}}
+{% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeShortUrl/forgeshorturl/main.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/main.py b/ForgeShortUrl/forgeshorturl/main.py
index 41d9adc..6df4be9 100644
--- a/ForgeShortUrl/forgeshorturl/main.py
+++ b/ForgeShortUrl/forgeshorturl/main.py
@@ -6,7 +6,7 @@ from allura.app import Application, SitemapEntry, DefaultAdminController
 from allura import model as M
 from allura.lib.security import require_access, has_access
 from allura.lib import helpers as h
-from allura.lib.search import search
+from allura.lib.search import search, SearchError
 from allura.controllers import BaseController
 from allura.lib.widgets import form_fields as ffw
 from allura.lib.widgets.search import SearchResults
@@ -156,6 +156,7 @@ class RootController(BaseController):
                      'search?' +
                      urlencode(dict(q=q, history=history)))
         results = []
+        search_error = None
         count = 0
         limit, page, start = g.handle_paging(limit, page, default=25)
         if not q:
@@ -167,13 +168,16 @@ class RootController(BaseController):
                     'type_s:%s' % ShortUrl.type_s]
             if not has_access(c.app, 'view_private'):
                 query.append('private_b:False')
-            results = search(q, fq=query, short_timeout=True)
+            try:
+                results = search(q, fq=query, short_timeout=True, ignore_errors=False)
+            except SearchError as e:
+                search_error = e
 
             if results:
                 count = results.hits
         c.search_results = W.search_results
         return dict(q=q, history=history, results=results or [],
-                    count=count, limit=limit, page=page)
+                    count=count, limit=limit, page=page, search_error=search_error)
 
     @expose()
     def _lookup(self, pname, *remainder):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeShortUrl/forgeshorturl/templates/search.html
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/templates/search.html b/ForgeShortUrl/forgeshorturl/templates/search.html
index 7d65a95..795681b 100644
--- a/ForgeShortUrl/forgeshorturl/templates/search.html
+++ b/ForgeShortUrl/forgeshorturl/templates/search.html
@@ -6,6 +6,6 @@
 {% block short_url_content %}{% endblock %}
 {% block content %}
 {{c.search_results.display(results=results,q=q,history=history,
-count=count,limit=limit,page=page)}}
+count=count,limit=limit,page=page,search_error=search_error)}}
 {% endblock %}
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 031eded..11f70ca 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -24,7 +24,7 @@ from allura.model import ACE, ALL_PERMISSIONS, DENY_ALL
 from allura.model.timeline import ActivityObject
 
 from allura.lib import security
-from allura.lib.search import search_artifact
+from allura.lib.search import search_artifact, SearchError
 from allura.lib import utils
 from allura.lib import helpers as h
 
@@ -693,8 +693,8 @@ class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
             else:
                 matches = None
             solr_error = None
-        except ValueError, e:
-            solr_error = e.args[0]
+        except SearchError as e:
+            solr_error = e
             matches = []
         if matches:
             count = matches.hits

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index f955060..7ca97eb 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -17,6 +17,7 @@ from forgetracker import model as tm
 
 from allura.lib.security import has_access
 from allura.lib import helpers as h
+from allura.lib.search import SearchError
 from allura.tests import decorators as td
 from ming.orm.ormsession import ThreadLocalORMSession
 
@@ -768,7 +769,7 @@ class TestFunctionalController(TrackerTestController):
     @patch('forgetracker.tracker_main.search_artifact')
     def test_save_invalid_search(self, search_artifact):
         err = 'Error running search query: [Reason: undefined field label]'
-        search_artifact.side_effect = ValueError(err)
+        search_artifact.side_effect = SearchError(err)
         r = self.app.post('/admin/bugs/bins/save_bin',{
             'summary': 'This is not too long.',
             'terms': 'label:foo',

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 3aed073..2312388 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -27,7 +27,7 @@ from allura import model as M
 from allura.lib import helpers as h
 from allura.lib import utils
 from allura.app import Application, SitemapEntry, DefaultAdminController, ConfigOption
-from allura.lib.search import search_artifact
+from allura.lib.search import search_artifact, SearchError
 from allura.lib.decorators import require_post
 from allura.lib.security import (require_access, has_access, require,
                                  require_authenticated)
@@ -926,7 +926,7 @@ class BinController(BaseController):
             # Test the search by running it
             with h.push_config(c, app=self.app):
                 search_artifact(TM.Ticket, bin.terms, rows=0, short_timeout=True)
-        except ValueError, e:
+        except SearchError as e:
             # Search threw an error.
             # Save the error on the bin object for displaying
             # in the template.
@@ -999,7 +999,7 @@ class BinController(BaseController):
                         try:
                             with h.push_config(c, app=self.app):
                                 search_artifact(TM.Ticket, bin.terms, rows=0, short_timeout=True)
-                        except ValueError, e:
+                        except SearchError as e:
                             # Search threw an error.
                             # Save the error on the bin object for displaying
                             # in the template.

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeWiki/forgewiki/templates/wiki/search.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/search.html b/ForgeWiki/forgewiki/templates/wiki/search.html
index 829578a..0441d3e 100644
--- a/ForgeWiki/forgewiki/templates/wiki/search.html
+++ b/ForgeWiki/forgewiki/templates/wiki/search.html
@@ -6,5 +6,5 @@
 
 {% block wiki_content %}
   {{c.search_results.display(results=results,q=q,history=history,
-                             count=count,limit=limit,page=page)}}
+                             count=count,limit=limit,page=page,search_error=search_error)}}
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fad9e0c8/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 42a1d98..eb05bb7 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -17,7 +17,7 @@ from ming.orm import session
 from allura import model as M
 from allura.lib import helpers as h
 from allura.app import Application, SitemapEntry, DefaultAdminController
-from allura.lib.search import search
+from allura.lib.search import search, SolrError
 from allura.lib.decorators import require_post, Property
 from allura.lib.security import require_access, has_access
 from allura.controllers import AppDiscussionController, BaseController
@@ -296,23 +296,28 @@ class RootController(BaseController, DispatchIndex):
         'local wiki search'
         if project:
             redirect(c.project.url() + 'search?' + urlencode(dict(q=q, history=history)))
+        search_error = None
         results = []
         count=0
         limit, page, start = g.handle_paging(limit, page, default=25)
         if not q:
             q = ''
         else:
-            results = search(
-                q, short_timeout=True, rows=limit, start=start,
-                fq=[
-                    'is_history_b:%s' % history,
-                    'project_id_s:%s' % c.project._id,
-                    'mount_point_s:%s'% c.app.config.options.mount_point,
-                    '-deleted_b:true'])
+            try:
+                results = search(
+                    q, short_timeout=True, ignore_errors=False,
+                    rows=limit, start=start,
+                    fq=[
+                        'is_history_b:%s' % history,
+                        'project_id_s:%s' % c.project._id,
+                        'mount_point_s:%s'% c.app.config.options.mount_point,
+                        '-deleted_b:true'])
+            except SolrError as e:
+                search_error = e
             if results: count=results.hits
         c.search_results = W.search_results
         return dict(q=q, history=history, results=results or [],
-                    count=count, limit=limit, page=page)
+                    count=count, limit=limit, page=page, search_error=search_error)
 
     @with_trailing_slash
     @expose('jinja:forgewiki:templates/wiki/browse.html')


Mime
View raw message