|
@@ -104,6 +104,14 @@ class RawTextQuery(object):
|
104
|
104
|
self.languages.append(lang)
|
105
|
105
|
parse_next = True
|
106
|
106
|
|
|
107
|
+ # this force a engine
|
|
108
|
+ suffix = raw_query_parts[-1:][0]
|
|
109
|
+ if suffix[0] == '!':
|
|
110
|
+ suffix = suffix.replace('!', '')
|
|
111
|
+ if suffix in engine_shortcuts:
|
|
112
|
+ self.engines.append({'category': 'none', 'name': engine_shortcuts[suffix]})
|
|
113
|
+ self.specific = True
|
|
114
|
+
|
107
|
115
|
# this force a engine or category
|
108
|
116
|
if query_part[0] == '!' or query_part[0] == '?':
|
109
|
117
|
prefix = query_part[1:].replace('-', ' ').replace('_', ' ')
|