fix resultSize comparison in loop

move mergeWithTraditionalSearchResults to helper

test mergeWithTraditionalSearchResults