cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting in Web Services Lucene Query

veeshoo
Champ in-the-making
Champ in-the-making
Please tell me how to write a lucene query that will bring sorted resultsets? We are using web services API.

Can we do something like this? :

Query query = new Query("lucene", "PATH:\"app:company_home/cm:iTrust/cm:MutualFunds\" AND @\\{http\\://http://www.alfresco.org/model/content/1.0\\}author:\%22vishal%\'" AND sort_by([\"properties\",\"created\"])");
4 REPLIES 4

kdejaeger
Champ in-the-making
Champ in-the-making
I stumbled upon the same question.
I'm trying to write a lucene query which either sorts on a field or either gives me one result row (containing the maximum of a property).

Is this possible through webservices?

pmonks
Star Contributor
Star Contributor
For limiting the result set you can use SOAP headers - see http://wiki.alfresco.com/wiki/Web_Service_SOAP_Header for more details.

Regarding sorting, as best I can tell that's not exposed via the Web Services API (even though the core Alfresco Foundation Services API does support it).  This would be a good enhancement request to raise in JIRA (http://issues.alfresco.com/).

Cheers,
Peter

swilber
Champ in-the-making
Champ in-the-making
Can someone confirm that this is still the case, that sorting in a lucene query through web services is not supported? Any suggestions for a workaround?

Thanks,
Steve

asteiger
Champ in-the-making
Champ in-the-making
I'm also looking for confirmation. I don't see anything in the docs that indicate this is possible, but I want to make sure I am not overlooking anything.