cancel
Showing results for 
Search instead for 
Did you mean: 

Highlighted search term

former_member394902
Contributor
0 Kudos

Hello,

I have integrated a 3rd party search in the Portal using <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5e514b57-0701-0010-3796-deb3636835fa">this</a>. The problem is that the search term is not highlighted in the search result list for results coming from 3rd party. Whereas if the result is coming from TREX the search term is highlighted.

All I could find was that TREX takes care of highlighting the search term and then this gets displayed. See the <a href="http://help.sap.com/saphelp_nw04/helpdata/en/06/0ca63b4df12308e10000000a11402f/content.htm">Keep Content</a> parameter in this docu.

I guess this parameter is available only for indexes using the Trex Search Service and since my index uses my custom Search Service, I do not see this parameter in the config.

I want the search term to be highlighted in the 3rd party search result also?

Has anybody faced a similar problem and is there a way to achieve this?

Many Thanks,

Akhilesh

Accepted Solutions (1)

Accepted Solutions (1)

KarstenH
Advisor
Advisor
0 Kudos

Hi Akhilesh,

are you looking for:

1) highlighting in the content snippets (abstracts)?

2) highlighting in the HTML rendered document?

ad 1): Does the 3rd party earch return an abstract at all?

ad 2): This, I assume, you will only be able to achieve, if the 3rd party engine provides an HTML-version of the indexed docs and offers a URL, where you can retrieve that HTML with the additional highlighting information. You'd have to give that back as the "content link" to the KM search results page or render it as an additional link under the property "link" (the latter just may display the full-size URL, though).

If that will not do it, you will have to write at least an own property renderer or an own search result list renderer - both of course only helps, if an HTML is available at the 3rd party.

If the 3rd party does not have that service, well...

Cheers, Karsten

former_member394902
Contributor
0 Kudos

Hi Karsten,

Thanks for the explanation. I am looking for highlighting the search term in the content snippet. Yes the 3rd party returns an abstract and in my code i set the htmlSummary when creating the rawresult


rawResult.setHtmlSummary(resultElements<i>.getResultField(NewsSearchResult.RESULT_KEY_DESCRIPTION));

where NewsSearchResult.RESULT_KEY_DESCRIPTION returns the search result abstract.

But i cant see the search term highlighted in the search results page.

If i use the standard TREX service for searching through docuents the search term is highlighted in the results page.

Your help is much appreciated.

Thanks, Akhilesh

Former Member
0 Kudos

Hello,

I have developed and integrate a custom 3rd party engine.

But this is not return an abstract fo results.

I always have: "No document excerpt available" .

How have you done to return an abstract ?

Thanks,

Fabien

Answers (0)