Page 1 of 1

SearchPrx.addOrderByAsc

PostPosted: Tue Sep 06, 2011 2:36 pm
by johnjhufnagle
Hi,
I'm trying to figure out how to use addOrderByAsc/Desc.
What is the single parameter 'path'?
If I am performing byFullText() search can I order by an indexed field of the document?
I have a date field that in yyyymmdd format and would like to use that for my result ordering.

Thanks
John

Re: SearchPrx.addOrderByAsc

PostPosted: Thu Sep 08, 2011 8:24 am
by jmoore
Hi John,

addOrderBy is passed to a Criteria search on the top level object. So if you are running "onlyBy('Image')", then the "this" of the path is image. Examples of order-bys which you can use are:
Code: Select all
~/git $ git grep addOrderBy
components/server/test/ome/server/itests/search/SearchTest.java:        search.addOrderByDesc("description");
components/server/test/ome/server/itests/search/SearchTest.java:        search.addOrderByDesc("id");
components/server/test/ome/server/itests/search/SearchTest.java:        search.addOrderByDesc("details.creationEvent.id");
components/server/test/ome/server/itests/search/SearchTest.java:        search.addOrderByDesc("details.creationEvent.time");


Hope that helps.
~Josh.