Show More
@@ -3,7 +3,7 b'' | |||
|
3 | 3 | rhodecode.controllers.search |
|
4 | 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
5 | 5 | |
|
6 |
Search controller for |
|
|
6 | Search controller for RhodeCode | |
|
7 | 7 | |
|
8 | 8 | :created_on: Aug 7, 2010 |
|
9 | 9 | :author: marcink |
@@ -30,7 +30,8 b' from pylons import request, config, tmpl' | |||
|
30 | 30 | |
|
31 | 31 | from rhodecode.lib.auth import LoginRequired |
|
32 | 32 | from rhodecode.lib.base import BaseController, render |
|
33 |
from rhodecode.lib.indexers import CHGSETS_SCHEMA, SCHEMA, CHGSET_IDX_NAME, |
|
|
33 | from rhodecode.lib.indexers import CHGSETS_SCHEMA, SCHEMA, CHGSET_IDX_NAME, \ | |
|
34 | IDX_NAME, WhooshResultWrapper | |
|
34 | 35 | |
|
35 | 36 | from webhelpers.paginate import Page |
|
36 | 37 | from webhelpers.util import update_params |
@@ -58,20 +59,20 b' class SearchController(BaseController):' | |||
|
58 | 59 | c.cur_search = search_type = {'content': 'content', |
|
59 | 60 | 'commit': 'message', |
|
60 | 61 | 'path': 'path', |
|
61 |
'repository': 'repository' |
|
|
62 | .get(c.cur_type, 'content') | |
|
62 | 'repository': 'repository' | |
|
63 | }.get(c.cur_type, 'content') | |
|
63 | 64 | |
|
64 | 65 | index_name = { |
|
65 | 66 | 'content': IDX_NAME, |
|
66 | 67 | 'commit': CHGSET_IDX_NAME, |
|
67 |
'path': IDX_NAME |
|
|
68 |
|
|
|
68 | 'path': IDX_NAME | |
|
69 | }.get(c.cur_type, IDX_NAME) | |
|
69 | 70 | |
|
70 | 71 | schema_defn = { |
|
71 | 72 | 'content': SCHEMA, |
|
72 | 73 | 'commit': CHGSETS_SCHEMA, |
|
73 |
'path': SCHEMA |
|
|
74 |
|
|
|
74 | 'path': SCHEMA | |
|
75 | }.get(c.cur_type, SCHEMA) | |
|
75 | 76 | |
|
76 | 77 | log.debug('IDX: %s' % index_name) |
|
77 | 78 | log.debug('SCHEMA: %s' % schema_defn) |
@@ -138,6 +139,5 b' class SearchController(BaseController):' | |||
|
138 | 139 | log.error(traceback.format_exc()) |
|
139 | 140 | c.runtime = _('An error occurred during this search operation') |
|
140 | 141 | |
|
141 | ||
|
142 | 142 | # Return a rendered template |
|
143 | 143 | return render('/search/search.html') |
General Comments 0
You need to be logged in to leave comments.
Login now