Commit af7d3e4a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

full text: revert non-required change in FullTextKey.

parent 4fb13671
...@@ -35,6 +35,7 @@ from Products.ZSQLCatalog.SearchText import dequote ...@@ -35,6 +35,7 @@ from Products.ZSQLCatalog.SearchText import dequote
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
import re import re
FULLTEXT_BOOLEAN_DETECTOR = re.compile(r'.*((^|\s)[\+\-<>\(\~]|[\*\)](\s|$))')
class FullTextKey(DefaultKey): class FullTextKey(DefaultKey):
""" """
...@@ -42,7 +43,6 @@ class FullTextKey(DefaultKey): ...@@ -42,7 +43,6 @@ class FullTextKey(DefaultKey):
""" """
default_comparison_operator = 'match' default_comparison_operator = 'match'
get_operator_from_value = False get_operator_from_value = False
fulltext_boolean_detector = re.compile(r'.*((^|\s)[\+\-<>\(\~]|[\*\)](\s|$))')
def dequoteParsedText(self): def dequoteParsedText(self):
return False return False
...@@ -64,7 +64,7 @@ class FullTextKey(DefaultKey): ...@@ -64,7 +64,7 @@ class FullTextKey(DefaultKey):
append = new_value_list.append append = new_value_list.append
for value in operator_value_dict.pop('match', []): for value in operator_value_dict.pop('match', []):
if isinstance(value, basestring) and \ if isinstance(value, basestring) and \
self.fulltext_boolean_detector.match(value) is not None: FULLTEXT_BOOLEAN_DETECTOR.match(value) is not None:
operator_value_dict.setdefault('match_boolean', []).append(value) operator_value_dict.setdefault('match_boolean', []).append(value)
else: else:
append(value) append(value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment