Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-07 Thread Gimantha Bandara
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

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Gimantha Bandara
Please use the request body mentioned in the documentation jira I sent previously. On Wed, Oct 7, 2015 at 1:12 AM, Isuru Wijesinghe wrote: > Hi Gimantha, > > using the aggregate API [1], I passed the below lucene object. But it > gives me an error (Internal server error). Does

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Isuru Wijesinghe
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",

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Isuru Wijesinghe
Hi Thanuja, The problem is not in the luciene *group by. *It works perfectly with aggregate functions such as* SUM, MIN, MAX, AVG . *But actually it didn't work with *COUNT *function. Thanks and Regards, On Wed, Oct 7, 2015 at 12:07 AM, Thanuja Uruththirakodeeswaran < thanu...@wso2.com> wrote:

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Gimantha Bandara
Hi Isuru, Please refer to this[1] for equivalent COUNT in DAS. You can use aggregate API for your case. But it may have some performance issues which I am currently working on. [1] https://wso2.org/jira/browse/DOCUMENTATION-2438 On Tue, Oct 6, 2015 at 2:37 PM, Thanuja Uruththirakodeeswaran <

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Gimantha Bandara
Hi Isuru, On Tue, Oct 6, 2015 at 11:13 PM, Isuru Wijesinghe wrote: > Hi Thanuja, > > The problem is not in the luciene *group by. *It works perfectly with > aggregate functions such as* SUM, MIN, MAX, AVG . *But actually it > didn't work with *COUNT *function. > > What do you

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Thanuja Uruththirakodeeswaran
Hi Isuru, I think Gimantha has already discussed about this in this thread [1]. The link suggests to do lucene 'group by' queries using writing a custom facet collector. [1].

[Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Isuru Wijesinghe
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,

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Rukshan Premathunga
Hi Isuru, You can filter out result on more than one attribute using boolean operators [1]. ex: *"query" : "timestamp : [1243214324532 TO 4654365223] AND "processId" : 10035 * [1] https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Boolean operators On Tue, Oct 6, 2015 at 1:04 PM,

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Anjana Fernando
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 wrote: > Hi, > > I need to

Re: [Dev] [DAS] Performing SQL COUNT() operation through luciene

2015-10-06 Thread Isuru Wijesinghe
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