Commit 0c4cc449 authored by Vincent Pelletier's avatar Vincent Pelletier

Add a special case for SearchableText: when there are mustiple MATCH...

Add a special case for SearchableText: when there are mustiple MATCH subqueries, sum up all scores. This used to fail and should be the most sensible default behaviour.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25971 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed579d4e
......@@ -299,6 +299,10 @@ class SQLExpression(object):
for alias, column in sql_expression.getSelectDict().iteritems():
existing_value = result.get(alias)
if existing_value not in (None, column):
if alias == 'SearchableText':
# Custom conflict resolution
column = '%s + %s' % (existing_value, column)
else:
message = '%r is a known alias for column %r, can\'t alias it now to column %r' % (alias, existing_value, column)
if DEBUG:
message = message + '. I was created by %r, and I am working on %r (%r) out of [%s]' % (
......
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