diff --git a/product/ZSQLCatalog/SearchKey/FullTextKey.py b/product/ZSQLCatalog/SearchKey/FullTextKey.py index 48b7f8ac0909ebc2546ced2f2e61ca5713fa5424..d07e61760d8a94fe7ee3687eb6d6f2f9f554f90d 100644 --- a/product/ZSQLCatalog/SearchKey/FullTextKey.py +++ b/product/ZSQLCatalog/SearchKey/FullTextKey.py @@ -58,7 +58,7 @@ class FullTextKey(SearchKey): t_DOUBLEQUOTE = r'(\")' def t_WORD(self, t): - r'[^\+\-<>\(\)\~\*\"\s]$|[^\+\-<>\(\)\~\*\s]+[^\*\s\)]' + r'[^\+\-<>\(\)\~\*\"\s]$|[^\+\-<>\(\)\~\*\"\s]+[^\*\"\s\)]' #r'[^\+\-<>\(\)\~\*\"\s]\S*' #r'[\x7F-\xFF\w\d][\x7F-\xFF\w\d]*' # WORD may contain arbitrary letters and numbers without white space diff --git a/product/ZSQLCatalog/tests/testSearchKeys.py b/product/ZSQLCatalog/tests/testSearchKeys.py index ed80dea3f6e5f6e08190ddd248e965f39291f9ee..b429ed008ca362b06e5f32836cd1f68797bc2918 100644 --- a/product/ZSQLCatalog/tests/testSearchKeys.py +++ b/product/ZSQLCatalog/tests/testSearchKeys.py @@ -134,6 +134,7 @@ size/Child/34""" self.compare(FullTextKey, '+John -Doe', ('PLUS', 'WORD', 'MINUS', 'WORD',)) self.compare(FullTextKey, '.', ('WORD',)) + self.compare(FullTextKey, '"John Doe"', ('DOUBLEQUOTE', 'WORD', 'WORD', 'DOUBLEQUOTE')) self.compare(FullTextKey, 'John*', ('WORD', 'ASTERISK')) self.compare(FullTextKey, '+apple +(>turnover <strudel)', ('PLUS', 'WORD', 'PLUS', 'LEFTPARENTHES', 'GREATERTHAN', 'WORD',