From 93b5fe3c586ca1b9f6aacb33785f970f342b5a73 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Tue, 28 Oct 2014 14:08:36 +0100
Subject: [PATCH] full text: we only support the first full text score in
 select dict.

---
 product/ZSQLCatalog/SQLExpression.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/product/ZSQLCatalog/SQLExpression.py b/product/ZSQLCatalog/SQLExpression.py
index 6750c3dac0..128bbe6aae 100644
--- a/product/ZSQLCatalog/SQLExpression.py
+++ b/product/ZSQLCatalog/SQLExpression.py
@@ -334,6 +334,9 @@ class SQLExpression(object):
           if can_merge_sql_expression and alias in mergeable_set:
             # Custom conflict resolution
             column = '%s + %s' % (existing_value, column)
+          elif alias.endswith('__score__'):
+            # We only support the first full text score in select dict.
+            pass
           else:
             message = '%r is a known alias for column %r, can\'t alias it now to column %r' % (alias, existing_value, column)
             if DEBUG:
-- 
GitLab