cancel
Showing results for 
Search instead for 
Did you mean: 

Result Sorting in TREX search

Former Member
0 Kudos

Hi,

We have developed a custom search component for our application. We need to have the functionality of sorting the search results based on Date modified.

Please help me in finding the API's to achive the same.

Regards,

JK

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Jagadeesh,

Try this -

1. Navigate to System Administration - > System Configuration -> Knowledge Management -> Contenet Management -> User Interface -> (Select Advanced Mode) -> Search -> Property Set for Search Results.

2. Check property 'cm_modified', make sure option 'indexable' is enabled.

3. Go to 'search optin set' and check for properties -

Default sorting mode.

Default property for sorting.

Hope this helps.

Regards,

Amit Kade

Former Member
0 Kudos

Hi Amit,

Thanks for your reply.

Let me clarify you my requirement; I need to have an option for displaying the results sorted in Date Modified after the basic search is done.

ie., I will have a button saying: Sort by Date Modified after the basic search is performed and results are displayed.

Regards,

JK

former_member188556
Active Contributor
0 Kudos

Hi Jagdeesh,

As amit had said, did you try adding the custom command in the property for sorting?

It will come as a dropdown avalue and also there will be a button for you to select ascending/descending.

Let us know whether you have done the Search Option change.

Regards

BP

Former Member
0 Kudos

Hi,

I tried as suggested by Amit. I selected cm_modified in the allowed sort properties; but there is no change in the search results. I can't locate any sorting button or dropdown.

P.S the default Property is: cm_rnd_rankvalue

Tell me if I am missing anything.

Regards,

JK

former_member188556
Active Contributor
0 Kudos

Hi Jagdeesh,

Which search option are you using? Is it customized?

Sorting option will only come after you execute a search and there is more than 1 search result.

Have you enabled sorting option in the search option?

And you said u r using a custom "modified" property. You have to add that in ur sort option.

Pls go thru [Article|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0747ac2-ffd9-2910-de9a-8a3dc44da8b4] for various options you can customize

Regards

BP

Former Member
0 Kudos

Hi George,

We are not using the standard KM search iview. We have developed a custom Search iview.

The Search Function Used is:

ISearchSession session = federatedSearch.searchWithSession(qel, indexList, getResourceContext());

Can I use any API to sort the search results based on dateModified? Please help.

Regards,

JK.