cancel
Showing results for 
Search instead for 
Did you mean: 

TREX sort results by relevance

michaeljacobs
Explorer
0 Kudos

How if possible can i get TREX fuzzy search result to sort according to most relevant to the search term?

Accepted Solutions (1)

Accepted Solutions (1)

former_member193379
Active Contributor
0 Kudos

Hi Michael,

Please have look of the below discussion

http://scn.sap.com/thread/1467822

Thanks,

Hamendra

michaeljacobs
Explorer
0 Kudos

Hi Hamendra,

Thank you for the reply. Not exactly what i'm looking for though, we have fuzzy search working correctly, but now we want to sort the returned results by relevance.

For instance if you search for "scholl" then article with description "scholl for nails" should display first instead of article with description "bag for school", how can i get the result to sort by relevance to search term?

former_member193379
Active Contributor
0 Kudos

Hi Michael,

I think (not used) fuzzy serarch is sorted automatically by percentage match.

Please see the below SAP Help.

Fuzzy Search - Business Partners - SAP Library

Thanks,

Hamendra

michaeljacobs
Explorer
0 Kudos

Thank you Hamendra,

Seems like further down in our code we sorted the results again. One more question, do you perhaps know what the name of the  % Match field is.

former_member193379
Active Contributor
0 Kudos

Hi Michael,

Below SAP Help URL may help you in this regard.

Search Techniques - Business Partners - SAP Library

Thanks,

Hamendra

michaeljacobs
Explorer
0 Kudos

So i have the following ,

String[] attrList = {field1, field2, field3};

IQueryStatement statement = theCatalog.getCatalog().createQueryStatement();

statement.setStatement(filter, attrList, sortAttr, 1, CatalogParameters.maxSearchResults);

Once this statement is executed, i get the following fields back, field1, field2 and field3.

I'm looking for the field name that will return the % match field as per the link

former_member193379
Active Contributor
0 Kudos

Hi Michael,

Please go through the below property in XCM and after making the change bounce your development system and put debugger on and check the value of your above mentioned parameters while debugging.

fuzzySimilarity

Degree of similarity required between a document and the search query for the document to be returned in the result set of a fuzzy search.
Allowed value is between 0 and 1. The higher the value, the less fault-tolerant the search is regarding typing errors in the search term (for example, "Protal" for "Portal"). fuzzySimilarity = 1 means no fault tolerance (exact search). By default fuzzySimilarity is set to 0.6

Thanks,

Hamendra

michaeljacobs
Explorer
0 Kudos

Hi Hamendra,

Think we talking past each other on this one.

I'm basically looking to do,

"The percentage match can be shown for each search result (users must personalize the search result list to display the percentage match (% Match field)." as per below thread. How can i print out check the % Match value?

http://help.sap.com/saphelp_crm700_ehp02/helpdata/en/18/3446fb4b6d4a868002ff391b4e13a2/content.htm

former_member193379
Active Contributor
0 Kudos

Hi Micheal,

I didn't get anything proper in this, please have a look of the below document please if it helps

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60d61671-ce4a-2d10-ffa7-99265fb01...

Thanks,

Hamendra

michaeljacobs
Explorer
0 Kudos

Hi Hamendra,

Definitely saving this pdf, unfortunately it doesn't help me with my issue. I'm trying to do whats mention in that post but cannot seem to determine what the filed name for "% MATCH" is, oh and this is for web chanel/ISA.

Will continue digging around.

former_member193379
Active Contributor
0 Kudos

Hi Michael,

I will also keep an eye and definitly will update if I get anything on this.

Thanks,

Hamendra

Answers (0)