Can I change the domain URL in Search Results in Faceted Search?

If you want to change the root domain of the URL in your search results in your Angular JS plugin search (Similar to mapping directory to URL feature requirement in File collection) the following changes have to be made in the following files.

Changes are to be made in two files: 
1.  To make changes to the title URL in Search resultss Go to 
C:\SearchBloxServer\webapps\searchblox\plugin\js\services\searchblox-service.js
open the file in a code editor such as notepad++
The following lines have to be added from line no 341.

if (recstr.startsWith('http://server1.atrnet.gov'))
    {  
                var    modurl= recstr.replace("http://www.sample.com","http://www.example.org");
                computedResult.contentUrl = modurl;
    }
    else
    {
                computedResult.contentUrl = recstr;
    }    

Note: Please give the right URLs for replacement in the above code (if it is https please give the right protocol in the string). If there are any other changes or URLs to be added you can add one more if loop. 

2. To make changes in display URL
C:\SearchBloxServer\webapps\searchblox\plugin\views\component-templates\results.html 
Replace the following at line number 53
  <span class="url-bottom word-break-filter"></span>

Have more questions? Submit a request

Comments