AnsweredAssumed Answered

Searching by API

Question asked by srowsell on May 23, 2014
Latest reply on May 29, 2014 by srowsell
I'm trying to find the best way to do a search of the repository, returning the result set in some form (preferably JSON), ideally using something like SQL to form the query.  Most of what I've been doing so far have just been Lucene searches in javascript, and while those were fine for some applications I need to be a little more fine-tuned in my queries.  Some examples, especially showing how to handle custom properties, would be fantastic.

In a similar vein I did some digging (using Firebug) and found a link like this:

http://alf01:8080/alfresco/s/slingshot/search?site=&term=&tag=&maxResults=251&sort=&query={'prop_sts_acctNo':'100031','prop_sts_memberName':'','prop_sts_statementDate-date-range':'','prop_cm_name':'','prop_cm_title':'','prop_cm_description':'','prop_mimetype':'','prop_cm_modified-date-range':'','prop_cm_modifier':'','prop_sts_esid':'','prop_sts_branch':'','prop_sts_email':'','prop_sts_statementType':'','prop_sts_expirationDate-date-range':'','prop_sts_status':'','datatype':'sts:statement'}&repo=true&rootNode=alfresco://company/home&pageSize=50&startIndex=0&alf_ticket=TICKET_a12d8046f82a48b02288c214260f9f2a5ead6cdd

and that does more or less return what I want it to return.  Some of the name=value pairs in the query string don't work as I would expect them to work; I don't know what the "site" or "sort" values should be to do anything, as the values I've put into them (such as known values for sites for the "site", or "asc" for "sort") don't have any effect on the result set.  Is there a resource to look at what these search properties are supposed to mean?

Thanks muchly,

Steve

Outcomes