Commit 702f9298 authored by Ivan Tyagov's avatar Ivan Tyagov

Return 'version' & 'language' in search results.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44276 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f27a8cd
...@@ -117,6 +117,8 @@ else:\n ...@@ -117,6 +117,8 @@ else:\n
\'reference\': line[\'reference\'],\n \'reference\': line[\'reference\'],\n
\'category_relative_url\': line[\'category_relative_url\'],\n \'category_relative_url\': line[\'category_relative_url\'],\n
\'owner\': line[\'owner\'],\n \'owner\': line[\'owner\'],\n
\'version\': line[\'version\'],\n
\'language\': line[\'language\'],\n
\'web_site\': web_site.getRelativeUrl()})\n \'web_site\': web_site.getRelativeUrl()})\n
\n \n
# one document can belong to n categories, we need show only one doc\n # one document can belong to n categories, we need show only one doc\n
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
<value> <string>base_category_uid_list\r\n <value> <string>base_category_uid_list\n
kw\r\n kw\n
search_string\r\n search_string\n
is_full_text_search_on\r\n is_full_text_search_on\n
use_text_excerpts\r\n use_text_excerpts\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -90,9 +90,12 @@ SELECT catalog.uid, \n ...@@ -90,9 +90,12 @@ SELECT catalog.uid, \n
<dtml-if is_full_text_search_on> text, </dtml-if>\n <dtml-if is_full_text_search_on> text, </dtml-if>\n
category_uid,\n category_uid,\n
base_category_uid,\n base_category_uid,\n
category_relative_url\n category_relative_url,\n
versioning.version,\n
versioning.language\n
\n \n
FROM catalog,\n FROM catalog,\n
versioning,\n
(SELECT catalog.uid\n (SELECT catalog.uid\n
<dtml-if is_full_text_search_on>\n <dtml-if is_full_text_search_on>\n
<dtml-if use_text_excerpts>\n <dtml-if use_text_excerpts>\n
...@@ -141,7 +144,7 @@ FROM catalog,\n ...@@ -141,7 +144,7 @@ FROM catalog,\n
) AS join_category\n ) AS join_category\n
ON search_results.uid = join_category.join_category_uid\n ON search_results.uid = join_category.join_category_uid\n
\n \n
WHERE search_results.uid = catalog.uid\n WHERE search_results.uid = catalog.uid and versioning.uid = catalog.uid\n
\n \n
</dtml-let> </dtml-let>
......
12 13
\ 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