Hi All

We had in the past many cases in which the search engine returned duplicate 
records.
Most of those cases are not simple to resolve in the DB layer by changing the 
query due to schema limitations.
We had decided to handle that by adding DISTINCT to the queries that the search 
engine generates  [1]
However, we might have cases in which both DISTINCT and ORDER BY f({args}) 
(where f is a function call) is used 
In that case, we will get SQL exception since the ORDER BY is applied on the 
DISTINCT result that does not include f as a field.
I had prevented using DISTINCT in such cases [2]
That means that you still may got duplicates in such cases and then you should 
handle it in the same method as in [3]
(basically returning the function result in the select as a computed field)


[1] https://gerrit.ovirt.org/#/c/31896
[2] https://gerrit.ovirt.org/#/c/38459
[3] https://gerrit.ovirt.org/#/c/36946


Thanks
Eli Mesika

_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Reply via email to