cancel
Showing results for 
Search instead for 
Did you mean: 

New Index and Search Result Renderer

Former Member
0 Kudos

Hello,

I have develop a 3° party index using KM documentation "

Integrating 3rd-Party Search Engines into KM Index Management

"

The index is well working.

But I have a problem about the display of the result search screen.

Regarding the code and the Portal StandardSearchResultRenderer to see the properties that are displayed (see http://help.sap.com/saphelp_nw04/helpdata/en/79/a1d23e6b2c3d67e10000000a114084/frameset.htm), I do not manage to display the property"description" in place of property "documentabstract".

So my question are:
1. How can I set the value of the

documentabstract

property in my code?
(for example:+ return new Property(new PropertyName(IWcmConst.SAP_WCM_NAMESPACE_RENDERING, IWcmConst.PROP_), value);)+

2. If we can not set the value of the

documentabstract

property, can I create a new

Collection Render

in which I display the description in place of documentabstract ? But how can I associate this collection rederer only with the new index and keep the standard collection renderer for other indexes ?

3. Is it existing a better solution ?

Thanks,

Fabien

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The documentabstract value can be set using searchResult.setContentSnippet("...");

where searchResult is of type com.sapportals.wcm.service.indexmanagement.retrieval.search.ISearchResult

Former Member
0 Kudos

Hi Vincent,

Thanks for your answers and your help,

Fabien

Former Member
0 Kudos

go to

System Admin -> System Config -> KM -> CM -> User Interface -> Settings -> Coll Renderer Settings -> Show Advance -> SearchResultRedererSettings.

Take a copy or modify the StandardsedarchResultRenderer for parameter "Displayed Properties".

There you will find your "rnd:documentabstract" property, that you replace with what you want.

Hope this help

Vincent

Former Member
0 Kudos

Hi Vincent,

I have seen that I can chnage the property here.

But if I do this, all search index will have the same result layout.

I don't want to change the standard search result renderer for already existing index. I only want to create a new renderer for the index I have created.

For example:

- all indexes (except the new one) will be associated to the StandardSearchResultRenderer

- the new created index will be associated to the new SpecificSearchResultRenderer

But I don't known how to do this association...

Do you have any idea ?

Best Regards,

Fabien

Former Member
0 Kudos

No problem !!!

In the search iView, you created for your project (code link = com.sap.km.cm.basicsearch), you specify a "Layout Set for Search Results"

You take a copy of the standard "SearchResultLayoutSet" where you specify your own Collections and Ressources Renderer.

I did it last week, and I completely controled the layout of my search result, without coding, nor changing the standard search results

Hope this help

Vincent

Former Member
0 Kudos

What do you mean by "search iView" ?

Does i need to create a specific search iView or do you speak of the standard search iView ?

(I need only 1 search entrey component. But depending on the selected index in this component, I woudl like to display data differently)

I don't undersdant where to specify the standard renderer (layout) for <i>all</i> indexes search and the specific renderer (layout) fot my new index.

Can you give me more information ?

Thanks,

Fabien

Former Member
0 Kudos

Fabien,

I is not possible to change the search layout result based on the index used to retrieve the information, basicly because you can have on the same page results from various index -> what layout to use ??

So you definitively have to create a specific search iView, where you restrict the index used (via search option set) and define the layout you want.

This is the link to the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/c8/765140c770cd01e10000000a155106/content.htm">SAP Help</a> where you can find additional info regarding the default layout used for SearchResults.

You should now have all the info you need )

Hope this help

Kind regards

Vincent JOORIS

Former Member
0 Kudos

Vincent,

I know that writing a application (using documentation found in <b>Integrating 3rd-Party Search Engines into KM Index Management</b>), we can set data in fields displayed in the search result page.

For example, we can set the title using: <i>return new Property(new PropertyName(IWcmConst.SAP_WCM_NAMESPACE, IWcmConst.PROP_DISPLAYNAME), (value == null ? "" : value));</i>

But I don't manage to set the document abstract: I always have the "<i>No document excerpt available</i>".

I fhave ound that this property is: IWcmConst.PROP_DOC_ABSTRACT (documentabstract)..

Have you ever do this ?

Thanks,

Fabien

Former Member
0 Kudos

Fabien,

I'm not a developper ... and I did never used the <b>Integrating 3rd-Party Search Engines into KM Index Management</b>.

So, I do not understand what you are talking about ;-((

P.S. do not hasitate to reward points for helpfull answers.

Vincent