cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving most recent created/modified docs?

javahollic
Champ in-the-making
Champ in-the-making
Hello,
I'm using remote HTTP calls of the form:
http://localhost:8280/alfresco/service/api/search/keyword?q=TERMS&p=/&c=10&format=atom‍‍‍

This works great, however I want in to include date rage (ie documents created or modified say in the last 6hours).  I see http://wiki.alfresco.com/wiki/OpenSearch and http://wiki.alfresco.com/wiki/Search#Date_ranges but the former doesn't include range parameters and the latter is likely related to code co-located with alfresco?

I've tried a variety of parameters and values that don't seem to make a difference.  I've got the alfresco/HEAD checked out but can't seem to locate the keyword crossmatch that would give me code to look at.  Can someone clarify appropriate usage for date range, or better yet, point me at the code/script that handles the arguments.

I'm sure this is obvious, just not to me, yet.

Thanks!
Andy.
2 REPLIES 2

javahollic
Champ in-the-making
Champ in-the-making
OK so, finally located KeywordSearch, am now adding necessary stuff to support ranges, fingers crossed code submission gets approved  :wink:

javahollic
Champ in-the-making
Champ in-the-making
Hmm, still ongoing, another day burned! I can see this query building:

(  TYPE:"{http://www.alfresco.org/model/content/1.0}content" AND   (      @\{http\://www.alfresco.org/model/content/1.0\}name:'TERMS"      TEXT:"TERMS"  ))‍‍‍‍‍‍‍‍‍

Injecting new values into this seems tricky, though modifying post rendering to add new terms seems viable, if not a 'nice' way of building it, the following works, but I gather the TIME component isn't stored? so has to be split out and tested separately…
(  TYPE:"{http://www.alfresco.org/model/content/1.0}content" AND   (      @\{http\://www.alfresco.org/model/content/1.0\}name:'document"      TEXT:"document"  ) AND ( @cm\:created:[2010-06-16T22:50:00.000Z TO NOW] ))‍‍‍‍‍‍‍‍‍

I'm still unclear on the 'correct' way to inject new search terms into this query, anyone got ideas/pointers on how to proceed?
thanks,
Andy