merge search results if one path contains other