Hi Udara,

Yes, sorting of the data received at the DAS end (to a temporary table) can
be done within the Spark Query.

As per discussion with the DAS team,

*The the flow of retrieving data from DAS via a Lucene query works as
follows:*

A call to fetch data from DAS with a lucene query is run against the Lucene
indexes and the IDs of the most matching ("based on a Lucene score
function") results are returned.
A subsequent call is made to the given temporary table to fetch the data
values pertaining to those IDs.

Hence, overall what is returned is a not the results of a direct query onto
the temporary table but of a query of the IDs based on the matching Lucene
indexes.
This returned IDs are not always sorted as per required.

Regards


-------------------------------------
*Shabir Mohamed*
*Software Engineer*
WSO2 Inc.; http://wso2.com
Email: sha...@wso2.com <ayy...@wso2.com>
Mobile: +94 77 3516019 | +94 71 6583393

On Tue, Mar 1, 2016 at 10:21 PM, Udara Rathnayake <uda...@wso2.com> wrote:

> If it's a temporary table, you should be able to do the sorting within the
> spark query.
> So no need to worry about sorting at the client side.
>
> On Mon, Feb 29, 2016 at 11:45 PM, Shabir Mohamed <sha...@wso2.com> wrote:
>
>> Hi All,
>>
>> In the process of creating analytics gadgets for the IoT/EMM Server, I
>> have a need to fetch data from DAS filtered by some query parameters (ex:
>> deviceId, owner).
>>
>> In addition, I also have a need to sort the retrieved data based on a
>> specific attribute of the event-stream. As of what I had tried so far I
>> could not find any APIs provided at the DAS end to directly allow this
>> capability. Hence, I have taken to doing the sorting of the retrieved data
>> at my end.
>>
>> Is there any mechanism to achieve this from DAS itself, which I might
>> have missed?
>>
>> Regards
>> -------------------------------------
>> *Shabir Mohamed*
>> *Software Engineer*
>> WSO2 Inc.; http://wso2.com
>> Email: sha...@wso2.com <ayy...@wso2.com>
>> Mobile: +94 77 3516019 | +94 71 6583393
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Regards,
> UdaraR
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to