I tested COUNT aggregate Function locally and it works as expected. It works without setting aggregateLevel and parentPath also. Can you try with your request payload in a REST client (may be Chrome Advanced REST client) and see if you get Internal Error? if you get the internal error code 500 and no exception in the server side, may be the json payload is not correct ( like extra commas, spelling )
On Wed, Oct 7, 2015 at 1:18 AM, Gimantha Bandara <[email protected]> wrote: > Please use the request body mentioned in the documentation jira I sent > previously. > > On Wed, Oct 7, 2015 at 1:12 AM, Isuru Wijesinghe <[email protected]> wrote: > >> Hi Gimantha, >> >> using the aggregate API [1], I passed the below lucene object. But it >> gives me an error (Internal server error). Does the COUNT function disable >> from a configuration file due to performance issues? >> >> { >> "tableName": "PROCESS_USAGE_SUMMARY_DATA", >> "groupByField": "processDefKey", >> "aggregateFields": [ >> { >> "fieldName": "processInstanceId", >> "aggregate": "COUNT", >> "alias": "processInstanceCount" >> } >> ] >> } >> >> [1] >> https://docs.wso2.com/display/DAS300/Retrieving+Aggregated+Values+of+Given+Records+via+REST+API >> >> On Wed, Oct 7, 2015 at 10:06 AM, Nirmal Fernando <[email protected]> wrote: >> >>> Hi Isuru, >>> >>> Just happened to see that you are using "???" :-) You can easily save >>> some time by using "?" :-) >>> >>> On Tue, Oct 6, 2015 at 10:59 PM, Isuru Wijesinghe <[email protected]> >>> wrote: >>> >>>> Hi Anjana, >>>> >>>> I think the link [1] given something similar to *where* clause in sql >>>> (I mean the *query *part is something similar to *where *clause). Here >>>> what I really need to do is, use the count operation with *group by. * >>>> In addition to that does luicene support for ascending and descending order >>>> ??? >>>> >>>> On Tue, Oct 6, 2015 at 3:54 PM, Anjana Fernando <[email protected]> >>>> wrote: >>>> >>>>> Hi Isuru, >>>>> >>>>> You can use the REST APIs search count [1] operation. >>>>> >>>>> [1] >>>>> https://docs.wso2.com/display/DAS300/Retrieving+the+Number+of+Records+Matching+the+Given+Search+Query+via+REST+API >>>>> >>>>> Cheers, >>>>> Anjana. >>>>> >>>>> On Tue, Oct 6, 2015 at 1:04 PM, Isuru Wijesinghe <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I need to perform COUNT() operation through DAS REST API (an example >>>>>> is shown below). I tried to pass COUNT() from a luciene object. But it >>>>>> didn't work for me. Does DAS support COUNT operation through luciene ??? >>>>>> if not how can I enable it in DAS side??? >>>>>> >>>>>> eg: *SELECT startedTime, processDefinitionId, >>>>>> COUNT(processInstanceId) AS processInstanceCount FROM >>>>>> PROCESS_USAGE_SUMMARY >>>>>> GROUP BY startedTime, processDefinitionId;* >>>>>> >>>>>> In addition to that, is that possible to pass more than one parameter >>>>>> to the query part in luicene object, because most graphs have to provide >>>>>> a >>>>>> secondary filter to get the result. As an example I need to filter the >>>>>> result from date range as well as process id. I need something like >>>>>> this. >>>>>> >>>>>> *"query" : "timestamp : [1243214324532 TO 4654365223], processId : >>>>>> 10035" * >>>>>> >>>>>> Any help will be appreciated. >>>>>> >>>>>> -- >>>>>> Isuru Wijesinghe >>>>>> *Software Engineer* >>>>>> Mobile: 0710933706 >>>>>> [email protected] >>>>>> >>>>>> _______________________________________________ >>>>>> Dev mailing list >>>>>> [email protected] >>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Anjana Fernando* >>>>> Senior Technical Lead >>>>> WSO2 Inc. | http://wso2.com >>>>> lean . enterprise . middleware >>>>> >>>> >>>> >>>> >>>> -- >>>> Isuru Wijesinghe >>>> *Software Engineer* >>>> Mobile: 0710933706 >>>> [email protected] >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> >>> Thanks & regards, >>> Nirmal >>> >>> Team Lead - WSO2 Machine Learner >>> Associate Technical Lead - Data Technologies Team, WSO2 Inc. >>> Mobile: +94715779733 >>> Blog: http://nirmalfdo.blogspot.com/ >>> >>> >>> >> >> >> -- >> Isuru Wijesinghe >> *Software Engineer* >> Mobile: 0710933706 >> [email protected] >> > > > > -- > Gimantha Bandara > Software Engineer > WSO2. Inc : http://wso2.com > Mobile : +94714961919 > -- Gimantha Bandara Software Engineer WSO2. Inc : http://wso2.com Mobile : +94714961919
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
