cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating 3rd party search engine preserving ranking information

former_member185837
Active Participant
0 Kudos

I'm referring to the article <b>Integrating 3rd party search engines into KM index management</b>:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/integrating 3rd party search engines into km index management.article

<b>Moderator Note:</b>

Link is now in KM developer guide under

https://media.sdn.sap.com/html/submitted_docs/nw_kmc/howto/km/using_global_services/Integrating%203r...

In the sample example, the method CustomerIndexCollection.getRawSearchResultList() has this fragment of code:

rawResult = rawSession.createRawSearchResult(sURL, size,             
		//if a value of a property can be returned for a sort
		//it should be inserted here instead of the default p
		this.addSortProperty(rawSession.getSortProperty()),  
		this.createResourcePropertiesMap(resultElements[i ]));

It seems that if the 3rd party search engine has returned some value for ranking, this info should be somehow inserted here.

Could you please give me some deeper detail about this issue? I am stucked with addSortProperty(rawSession.getSortProperty())

Cheers, Davide<b></b>

Message was edited by: Karsten Hohage

Accepted Solutions (1)

Accepted Solutions (1)

former_member185837
Active Participant
0 Kudos

OK, there I can set the rank value. However this value isn't taken into account for sorting the results.

How can I get the results ordered by the rank value?

Thanks all, Davide

Former Member
0 Kudos

I think this value is taken into account if you use the standard search. just sort your result by "relevance"

Franck

Answers (2)

Answers (2)

former_member185837
Active Participant
0 Kudos

You're right!

I wonder if there is some clever way to pass this rank info.

I passed it through 

rawResult = rawSession.createRawSearchResult(sURL, <b>rank</b>,
		//if a value of a property can be returned for a sort property
		//it should be inserted here instead of the default property value!
		this.addSortProperty(rawSession.getSortProperty()),
		this.createResourcePropertiesMap(resultElements[i ]));

Then I created a Map to link RIDs and ranks inside <b>CustomerSearchIndexCollection.getSearchResults()</b>

and passed this Map to the helper method <b>createSearchResultList()</b>, where <b>createSearchResultObject(IResource res, float rank)</b> is called.

Any better suggestion?

Thanks a lot, Davide

Former Member
0 Kudos

Hi, Davide

I think you search is in the CustomerSearchIndexCollection.java in the following code

ISearchResult searchResult = this.createSearchResultObject(resource, 1.0F);

It's a ranking of 100%

Regards,

Franck