web/views/magicsearch.py
changeset 2567 961aa959f07a
parent 2476 1294a6bdf3bf
child 2650 18aec79ec3a3
--- a/web/views/magicsearch.py	Wed Jul 29 18:25:01 2009 +0200
+++ b/web/views/magicsearch.py	Wed Jul 29 18:27:41 2009 +0200
@@ -170,10 +170,7 @@
     """
     priority = 2
     def preprocess_query(self, uquery, req):
-        try:
-            rqlst = parse(uquery, print_errors=False)
-        except (RQLSyntaxError, BadRQLQuery), err:
-            return uquery,
+        rqlst = parse(uquery, print_errors=False)
         schema = self.vreg.schema
         # rql syntax tree will be modified in place if necessary
         translate_rql_tree(rqlst, trmap(self.config, schema, req.lang), schema)
@@ -204,7 +201,7 @@
             elif len(words) == 3:
                 args = self._three_words_query(*words)
             else:
-                args = self._multiple_words_query(words)
+                raise
         return args
 
     def _get_entity_type(self, word):
@@ -291,11 +288,6 @@
                                   self._complete_rql(word3, etype, searchattr=rtype))
         return rql, {'text': word3}
 
-    def _multiple_words_query(self, words):
-        """specific process for more than 3 words query"""
-        return ' '.join(words),
-
-
     def _expand_shortcut(self, etype, rtype, searchstr):
         """Expands shortcut queries on a non final relation to use has_text or
         the main attribute (according to possible entity type) if '%' is used in the