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 @@
</item>
<item>
<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
########### CONFIGURATION ######################################\n
# This is a query for search translated properties of Person #\n
......@@ -61,17 +61,14 @@
################################################################\n
\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\': \'last_name\'})\n
)\n
Query(**{\'content_translation.property_name\': \'title\'})\n
)\n
\n
################################################################\n
# Above query must make SQL condition like this. #\n
################################################################\n
# MATCH(content_translation.translated_text) AGAINST({value})\n
# AND ( content_translation.property_name = \'first_name\'\n
# OR content_translation.property_name = \'last_name\')\n
# AND content_translation.property_name = \'title\'\n
\n
return query\n
</string> </value>
......@@ -115,7 +112,6 @@ return query\n
<string>Query</string>
<string>SimpleQuery</string>
<string>AndQuery</string>
<string>OrQuery</string>
<string>_apply_</string>
<string>query</string>
</tuple>
......
......@@ -60,8 +60,8 @@
# If you want to index properties more, extend property_list #\n
# and portal_type_list. #\n
################################################################\n
property_list = (\'first_name\', \'last_name\')\n
portal_type_list = (\'Person\')\n
property_list = (\'title\',)\n
portal_type_list = (\'Person\',)\n
\n
\n
result = []\n
......
21
\ No newline at end of file
25
\ 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