Project: talenddataquality
Issue TDQ-4669: change the strategy behavior
At the moment, if "First" is selected as strategy, and the lookup returns several Matches and several Possibles, the output will contain the first one of Matches, and the first one of Possible Matches. The "Last" and "Best" Strategies have the similar behaviors. These behaviors should be changed according to the objectif of the strategy in real life. A. "First" strategy aims to quickly find out a match who passes the threshould. The output should only contain the first match, or the first possible match in case there is no match. B. "Last" strategy is for special reason, for example, the records are merged from several sources and the last source among them is supposed to contain records with best quality. The behavior of this strategy should be similar to "First". C. "Best" strategy is used to find out the best match, or the best possible match when there is no match, there should be only one output record for a source record. Imagine that we have the following sequences of scores as a result of lookup, for which 0.7 and 0.3 are respectively the threshoulds of match and possible match: A) 0.4 0.6 0.9 1.0 0.8 0.5 0.1 With "First" strategy, the final result should be 0.9 With "Last" strategy, the final result should be 0.8 With "Best" strategy, the final result should be 1.0 remark: if the Matches connection is not activated, it only means the user don't want to know the matches. So even in this case, we should not output anything to the Possible connection. B) 0.4 0.6 0.5 0.1 With "First" strategy, the final result should be 0.4 With "Last" strategy, the final result should be 0.5 With "Best" strategy, the final result should be 0.6
Story points: 8