AnsweredAssumed Answered

alfresco5.0 xpath sorting problem

Question asked by dicolar on Nov 23, 2015
Latest reply on Nov 23, 2015 by dicolar
hi there,
recently i'm programming with the newest Alfresco5.0.0d community-edition.
since considering of improving the performance of indexing,alfresco will index by a period of 15 secs.
but here comes the problem,after i uploaded/created a document & i search it immediately by Lucene(it calls the Solr in fact),it returns the resultset which does not contain the newest object i created.
so,i have to give up my idea of searching by Lucene and go to trying  XPATH.
but now again the problem comes,where is the JCR-XPATH??
this is my query string:

/app:company_home//*[subtypeOf('cm:content')] order by @cm:name

when i concat a string of 'order by @cm:name', it throws a sweet exception to me saying it cannot recognize the orderby… segment.
and i didn't see the JCR-XPATH field in SearchService anymore.i also searched in the source code with keyword of 'jcr',but no useful result came out.

so how can i sort the resultset of xpath-searching? or do u have any idea of IMMEDIATE-SEARCHING?