Commit 4be0f66a authored by Ivan Tyagov's avatar Ivan Tyagov

Add '*' in front of all 'natural' mode full text queries so full text query...

Add '*' in front of all 'natural' mode full text queries so full text query key is able to detect we need natural mode. Test is expected to pass.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43287 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4374bd6b
...@@ -1017,7 +1017,6 @@ class TestDocument(TestDocumentMixin): ...@@ -1017,7 +1017,6 @@ class TestDocument(TestDocumentMixin):
parsed_string = parse(search_string) parsed_string = parse(search_string)
self.assertEquals(parsed_string['portal_type'], ['Document','Presentation','"Web Page"']) self.assertEquals(parsed_string['portal_type'], ['Document','Presentation','"Web Page"'])
@expectedFailure
def test_11_Base_getAdvancedSearchResultList(self): def test_11_Base_getAdvancedSearchResultList(self):
""" """
Test search string search capabilities using Base_getAdvancedSearchResultList script. Test search string search capabilities using Base_getAdvancedSearchResultList script.
...@@ -1097,11 +1096,13 @@ class TestDocument(TestDocumentMixin): ...@@ -1097,11 +1096,13 @@ class TestDocument(TestDocumentMixin):
self.assertSameSet([document_1,web_page_1], getAdvancedSearchStringResultList(**kw)) self.assertSameSet([document_1,web_page_1], getAdvancedSearchStringResultList(**kw))
# exact word search # exact word search
kw = {'searchabletext_phrase': 'linux python'} kw = {'searchabletext_any': '*',
'searchabletext_phrase': 'linux python'}
self.assertSameSet([document_1], getAdvancedSearchStringResultList(**kw)) self.assertSameSet([document_1], getAdvancedSearchStringResultList(**kw))
kw = {'searchabletext_phrase': 'python linux'} kw = {'searchabletext_any': '*',
'searchabletext_phrase': 'python linux'}
self.assertSameSet([document_2], getAdvancedSearchStringResultList(**kw)) self.assertSameSet([document_2], getAdvancedSearchStringResultList(**kw))
kw = {'searchabletext_any': '', kw = {'searchabletext_any': '*',
'searchabletext_phrase': 'python linux knowledge system'} 'searchabletext_phrase': 'python linux knowledge system'}
self.assertSameSet([document_2], getAdvancedSearchStringResultList(**kw)) self.assertSameSet([document_2], getAdvancedSearchStringResultList(**kw))
......
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