Hi there
I've got several web scripts that take some parameters, perform a search & return the results as JSON. The Java code looks like this at a high level:
1. Construct AFTS query from params
2. Perform search using SearchService to return a collection of node refs
3. Iterate search results, calling NodeService#getProperties for each node ref, and build up the response data.
This sppears to be very inefficient as you need to make multiple calls to the search engine. I was thinking that surely there's got to be a better way. i.e. can we retrieve the metadata in a single query to the DB? e.g. SELECT col1, col2, col3 FROM table1 WHERE...
I then remembered that Alfresco supports CMIS. So it should be possible to run CMIS SQL queries? I ran some queries in Alfresco Admin's Node Browser and while they worked, it didn't render the individual columns. However I've read that this behaviour is possible using Chemistry's workbench. Is it possible use the SearchService to return a ResultSet that contains metadata/columns rather than node refs. If so, could you point me towards a code example as I've not been able to find one.
Cheers
Mark