Gravatar for erkan.yildiz@avanade.com

Question by erkany, Jan 30, 2015 10:47 AM

clickUri in Search Results pointing to Content Authoring Server URL

Hi,

I duplicated the Search View Component and using the underscore template code that comes with it. I did not change anything for displaying the search result item title and the link and below is how it looks now:

{{=title?highlight(title, titleHighlights):clickUri}}

I see the clickUri generates a FULL link starting from http:// and it points to our CA server site. (This is part of a multi server Coveo install - 1 CA and 1 CD server. Coveo is installed on CA server )

We have multiple sites hosted under the same Sitecore Instance (7.5) - What I would like to see in search results is :

Host Name of the Site I am on + relative path to the item

So if I am on http://samplesite and searched for about page the search result should link to:

http://samplesite/about

How do I configure / implement this?

Thanks,

1 Reply
Gravatar for lbergeron@coveo.com

Answer by Luc Bergeron, Jan 30, 2015 11:09 AM

You have some options to define the host name that will be used.

  1. Use the ServerUrl setting in Coveo.SearchProvider.config. Setting it to "http://samplesite" will do as you want. But you must know that CES will use this URL to expand permissions. In other words, CES must be able to reach the Sitecore instance using this address.
  2. You can use the coveoPostItemProcessingPipeline pipeline to change the clickable URL at indexing time. See https://developers.coveo.com/display/SC201501/Using+the+Coveo+Pipelines
  3. You can use the coveoProcessParsedRestResponse pipeline to changer the clickable URL at query time. See https://developers.coveo.com/display/SC201501/Altering+Search+Results+Before+They+Are+Displayed+in+a+Search+Interface
  4. It is also possible to change the URL directly in the search page using JavaScript.

Hope it answers your question

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 30, 2015 11:12 AM

Thank you I will go with option 2 - as option 1 will set a global host name and it does not help me with multiple sites hosted under the same sitecore instance. Thanks

Ask a question