Refactor mergeSearchResultWithConfiguration using Stream foreach and add Java Doc comment