cancel
Showing results for 
Search instead for 
Did you mean: 

Sort in TREX search programmatically

Former Member
0 Kudos

Hello

I want to search all folders that have a property "type" with the value "post" sorted by the date of creation. The order has to be inverse, which means that the last created has to appear first. I want to do this from my code using SearchQueryBuilder, IQueryEntry and so ¿Can anyone help me to do this?

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Marcos,

You do not need to program this.

The order is defined by the LAyoutset you define in the search

the property type can be added to the querystring (if its a quick search) or th the predefined properties in the search option set with the follwing format:

search option sets:

http://help.sap.com/saphelp_nw2004s/helpdata/en/f9/b84d40cef71059e10000000a155106/frameset.htm

prdefined Props:

https://www.sdn.sap.com/irj/sdn/thread?threadID=30216

hope this helps,

Axel

-


Please consider rewarding points to helpful answers on SDN

Former Member
0 Kudos

Hello Axel

This is a good solution if I can use the Search iView, but i have to use my own development and have to use the KM API for doing this.

Thanks anyway.

Former Member
0 Kudos

hello again

I have just solved my problem. I hadn´t realised that there is a parameter ISortPropertyName in the method IFederatedSearch.searchWithSession

Now it works fine