Commit bcb06f45 authored by Yusuke Muraoka's avatar Yusuke Muraoka

title is simpler

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33179 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 706bfaad
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, SimpleQuery, AndQuery, OrQuery\n <value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, SimpleQuery, AndQuery\n
\n \n
########### CONFIGURATION ######################################\n ########### CONFIGURATION ######################################\n
# This is a query for search translated properties of Person #\n # This is a query for search translated properties of Person #\n
...@@ -61,17 +61,14 @@ ...@@ -61,17 +61,14 @@
################################################################\n ################################################################\n
\n \n
query = AndQuery(SimpleQuery(**{\'content_translation.translated_text\': value, \'comparison_operator\': \'match\'}),\n query = AndQuery(SimpleQuery(**{\'content_translation.translated_text\': value, \'comparison_operator\': \'match\'}),\n
OrQuery(Query(**{\'content_translation.property_name\': \'first_name\'}),\n Query(**{\'content_translation.property_name\': \'title\'})\n
Query(**{\'content_translation.property_name\': \'last_name\'})\n
)\n
)\n )\n
\n \n
################################################################\n ################################################################\n
# Above query must make SQL condition like this. #\n # Above query must make SQL condition like this. #\n
################################################################\n ################################################################\n
# MATCH(content_translation.translated_text) AGAINST({value})\n # MATCH(content_translation.translated_text) AGAINST({value})\n
# AND ( content_translation.property_name = \'first_name\'\n # AND content_translation.property_name = \'title\'\n
# OR content_translation.property_name = \'last_name\')\n
\n \n
return query\n return query\n
</string> </value> </string> </value>
...@@ -115,7 +112,6 @@ return query\n ...@@ -115,7 +112,6 @@ return query\n
<string>Query</string> <string>Query</string>
<string>SimpleQuery</string> <string>SimpleQuery</string>
<string>AndQuery</string> <string>AndQuery</string>
<string>OrQuery</string>
<string>_apply_</string> <string>_apply_</string>
<string>query</string> <string>query</string>
</tuple> </tuple>
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
# If you want to index properties more, extend property_list #\n # If you want to index properties more, extend property_list #\n
# and portal_type_list. #\n # and portal_type_list. #\n
################################################################\n ################################################################\n
property_list = (\'first_name\', \'last_name\')\n property_list = (\'title\',)\n
portal_type_list = (\'Person\')\n portal_type_list = (\'Person\',)\n
\n \n
\n \n
result = []\n result = []\n
......
21 25
\ No newline at end of file \ No newline at end of file
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