cancel
Showing results for 
Search instead for 
Did you mean: 

How to change search result list entries?

Former Member
0 Kudos

Hi together,

I'd like to fit the TREX search result list to my own requirements. I've edit the Search Result Renderer Settings, Search Result Layout Set, Search Component Set and the Search Option Set. But that's not enough.

1.) I would like to display the relevant index name, in which the document was found.

2.) For special indexes (not for all!) I want to change the content link:

For example: if TREX is finding an xml-File in index "abc_index" I would like to change the content link from

"https://portalserver/irj/go/km/docs/folder/p76.xml" to

"https://portalserver/irj/go/km/docs/folder/p76.htm"

and from

"https://portalserver/irj/go/km/docs/folder/p76_data.xml" to

"https://portalserver/irj/go/km/docs/folder/p76.htm"

3.) I'd like to display a special part of the document as a explanatory text in the result list.

I think point 1 and 3 are possible with properties and HTML-extractors. But point 2 I'm afraid I have to create my own component.

But how to manage this? I cannot find any code snippets or tutorials or pattern to copy and develop further.

Is it possible or advised to write a WebDynpro? Are there other possibilities? I don't know how to start.

I would be pretty delighted to get any idea...

Thanks a lot

Steffi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey all,

just to let you know how I solved this demand:

1) I've created a new property renderer for the index name.

keywords: IIndexService, IIndex and index.getIndexName();

2.) and 3.) I wasn't able to change the content link! So I've created a custom property and a appropriate property renderer. Depending on the resource index this renderer extracts a special part of the resource content with a BufferedReader and generates a new link with the target URL. In the search result I display this new property instead ob displayname and contentlink.

keywords: IURLGeneratorService, Link, BufferedReader

I got some ideas by decompiling the standard property renderers in km.appl.ui.flex.property_core.jar.

Thanks for the help!

Former Member
0 Kudos

Hi Stefanie

Heres how I would do it:

1) When you enter the details window for a certain resource, I believe the index to which this resource belongs is diplayed. Isn't that information contained in a property that you can display as you like configuring the collection renderer?

2) You should be able to solve this problem using an (undocumented) wrapper renderer and perhaps write a property renderer yourself. If you like, I can send you some documentation on the wrapper renderer.

3) You could for instance place this information in a metatag of the html-documents and use a web property extractor to put this information into a property. If you need this to work also for the xml-files, I guess you should use the text property extractor instead.

Best regards,

Martin Søgaard

Former Member
0 Kudos

Hey Martin,

thank you very much for your quick answer!

1.) I'm able to display the "indexIdForIndexing" property, thats not as elegant as I wished, because it's the id and not the name, but it has to be enough.

2.) I will try it.

3.) Thats exactly what I tried, but I think the property extractors only works with web repositories. But one of my index points to a webDAF repository and the other to a KM folder. I don't know how to implement the extractation for that constellation.

Many thanks for your effort!

Steffi

Former Member
0 Kudos

You can create a Web Dynpro application along with KM API for complete customization.

Former Member
0 Kudos

Hi Stefanie

1) If you want to be able to show the name instead, you should write your own property renderer. Heres the link for the documentation: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c739e546-0701-0010-53a9-a37... -> How to Implement Flexible UI

Components -> Property Renderer

2) Documentation will be send in a matter of minutes.

3) I also think the web property extractors only work with the web repository manager, because as far as I know that is the only repository manager, where you can select a web property extractor upon creation. I guess you could open an OSS to SAP and ask if its not possible to extract properties in your scenario just to be sure if its not possible. But my guess is that you either have to develop your own repository manager or publish your files on a web server in order to meet your requirements.

Best regards,

Martin

Former Member
0 Kudos

Hi Stefanie

Just to let you know: My mails to you are bouncing, so I cant send you any information on the wrapper.

Regards,

Martin