[zanata-bugs] [Bug 896332] RFE: Ability to prefer most recent 100 percent match over most used 100 percent match in translation memory.

bugzilla at redhat.com bugzilla at redhat.com
Mon Jan 21 09:56:17 UTC 2013


Product: Zanata
https://bugzilla.redhat.com/show_bug.cgi?id=896332

--- Comment #9 from Carlos Munoz <camunoz at redhat.com> ---
After looking at this in detail, I've found a possible solution for you to try
out Alex:

1. Remove the grouping by 'match' at the end of the query. (Leave the other
grouping by text flow)

2. Remove the 'match' column in the select portion of the hql query. 
The fact that we are getting the Text Flow Target match from that column
instead of the max column is the problem.

3. In CopyTransServiceImpl.copyTransPass (around line 230) remove the line that
reads 

HTextFlowTarget matchingTarget = (HTextFlowTarget)results.get(0);

and replace it with something like

HTextFlowTarget matchingTarget = entityManager.findById((Long)results.get(1));

Hibernate Cache should help us minimize the impact of that extra query.

Keep in mind that because of step #2, those indexes have changed, so the line
that reads

HTextFlow originalTf = (HTextFlow)results.get(1);

should now read

HTextFlow originalTf = (HTextFlow)results.get(0);


I have not been able to test this, but try it out and let me know if it solves
the issues.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=yRhHV73jx5&a=cc_unsubscribe




More information about the zanata-bugs mailing list