We did the blow change in fn_get_Categories function
if (!empty($params['get_frontend_urls'])) { foreach ($categories_list as &$category) { //$category['url'] = fn_url('categories.view?category_id=' . $category['category_id'], 'C'); // Custom change - To create a mapping of category to the URL created in the Category page (mapping for search resutls) $url = db_get_field('SELECT url FROM ?:categories WHERE category_id = ?i', $category['category_id']); if ($url == ''){ $result = fn_url('categories.view?category_id=' . $category['category_id'],'C'); } else { $result = fn_url($url); }} }