Re: UDF for sorting

2017-07-10 Thread Eduardo Alonso
I have read HowToContribute
 and created the ticket
CASSANDRA-13682 
with PR and path available flag.


Eduardo Alonso
Vía de las dos Castillas, 33, Ática 4, 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 828 6473 // www.stratio.com // *@stratiobd
*

2017-07-06 14:43 GMT+02:00 Eduardo Alonso :

> Hi Jeff:
>
> Do you mean something like this
> ?
>
> This is so basic(with no code change ) that i I have skipped the JIRA
> ticket creation
>
> Could you please review?
> Thank you
>
> Eduardo Alonso
> Vía de las dos Castillas, 33, Ática 4, 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 828 6473 // www.stratio.com // *@stratiobd
> *
>
> 2017-07-05 23:49 GMT+02:00 Jeff Jirsa :
>
>>
>>
>> On 2017-07-03 16:19 (-0700), Justin Cameron 
>> wrote:
>> > While you can't do this with Cassandra, you can get the functionality
>> you
>> > want with the cassandra-lucene-plugin (
>> > https://github.com/Stratio/cassandra-lucene-index/blob/branc
>> h-3.0.10/doc/documentation.rst#searching
>> > ).
>> >
>> > Keep in mind that as with any secondary index there are
>> performance-related
>> > limitations:
>> > https://github.com/Stratio/cassandra-lucene-index/blob/branc
>> h-3.0.10/doc/documentation.rst#performance-tips
>>
>>
>> We just added a "Plugins" section to the docs (
>> https://github.com/apache/cassandra/blob/trunk/doc/source/
>> plugins/index.rst )  - it would be nice if someone would add the
>> Cassandra-Lucene-Index plugin there.
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
>> For additional commands, e-mail: user-h...@cassandra.apache.org
>>
>>
>


Re: UDF for sorting

2017-07-06 Thread Eduardo Alonso
Hi Jeff:

Do you mean something like this
?

This is so basic(with no code change ) that i I have skipped the JIRA
ticket creation

Could you please review?
Thank you

Eduardo Alonso
Vía de las dos Castillas, 33, Ática 4, 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 828 6473 // www.stratio.com // *@stratiobd
*

2017-07-05 23:49 GMT+02:00 Jeff Jirsa :

>
>
> On 2017-07-03 16:19 (-0700), Justin Cameron 
> wrote:
> > While you can't do this with Cassandra, you can get the functionality you
> > want with the cassandra-lucene-plugin (
> > https://github.com/Stratio/cassandra-lucene-index/blob/
> branch-3.0.10/doc/documentation.rst#searching
> > ).
> >
> > Keep in mind that as with any secondary index there are
> performance-related
> > limitations:
> > https://github.com/Stratio/cassandra-lucene-index/blob/
> branch-3.0.10/doc/documentation.rst#performance-tips
>
>
> We just added a "Plugins" section to the docs ( https://github.com/apache/
> cassandra/blob/trunk/doc/source/plugins/index.rst )  - it would be nice
> if someone would add the Cassandra-Lucene-Index plugin there.
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
> For additional commands, e-mail: user-h...@cassandra.apache.org
>
>


Re: UDF for sorting

2017-07-05 Thread Jeff Jirsa


On 2017-07-03 16:19 (-0700), Justin Cameron  wrote: 
> While you can't do this with Cassandra, you can get the functionality you
> want with the cassandra-lucene-plugin (
> https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#searching
> ).
> 
> Keep in mind that as with any secondary index there are performance-related
> limitations:
> https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#performance-tips


We just added a "Plugins" section to the docs ( 
https://github.com/apache/cassandra/blob/trunk/doc/source/plugins/index.rst )  
- it would be nice if someone would add the Cassandra-Lucene-Index plugin there.




-
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org



Re: UDF for sorting

2017-07-04 Thread Justin Cameron
Yes, it does - you'll just have to build for the 2.1.17 branch. You also
will have to use their alternative query syntax:
https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#alternative-syntaxes


On Tue, 4 Jul 2017 at 17:27 techpyaasa .  wrote:

> Hi Justin,
>
> Thanks for the reply.
> We are using c*-2.1.17 , does lucene plugin works with this version??
>
> On Tue, Jul 4, 2017 at 4:49 AM, Justin Cameron 
> wrote:
>
>> While you can't do this with Cassandra, you can get the functionality you
>> want with the cassandra-lucene-plugin (
>> https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#searching
>> ).
>>
>> Keep in mind that as with any secondary index there are
>> performance-related limitations:
>> https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#performance-tips
>>
>>
>> On Tue, 4 Jul 2017 at 07:17 DuyHai Doan  wrote:
>>
>>> Plain answer is no you can't
>>>
>>> The reason is that UDF only transform column values on each row but does
>>> not have the ability to modify rows ordering
>>>
>>> On Mon, Jul 3, 2017 at 10:14 PM, techpyaasa . 
>>> wrote:
>>>
 Hi all,

 I have a table like

 CREATE TABLE ks.cf ( pk1 bigint, cc1 bigint, disp_name text , stat_obj
 text, status int, PRIMARY KEY (pk1, cc1)) WITH CLUSTERING ORDER BY (cc1 
 ASC)

 CREATE INDEX idx1 on ks.cf(status);

 I want to have a queries like
 *select * from ks.cf  where pk1=123 and cc1=345;*

 and
 *select * from ks.cf  where pk1=123 and status=1;*
 In this case , I want rows to be sorted based on 'disp_name' (asc/desc)
 .

 Can I achieve the same using UDF or anything else ?? (Sorry If my
 understanding about UDF is wrong).

 Thanks in advance
 TechPyaasa

>>>
>>> --
>>
>>
>> *Justin Cameron*Senior Software Engineer
>>
>>
>> 
>>
>>
>> This email has been sent on behalf of Instaclustr Pty. Limited
>> (Australia) and Instaclustr Inc (USA).
>>
>> This email and any attachments may contain confidential and legally
>> privileged information.  If you are not the intended recipient, do not copy
>> or disclose its content, but please reply to this email immediately and
>> highlight the error to the sender and then immediately delete the message.
>>
>
> --


*Justin Cameron*Senior Software Engineer





This email has been sent on behalf of Instaclustr Pty. Limited (Australia)
and Instaclustr Inc (USA).

This email and any attachments may contain confidential and legally
privileged information.  If you are not the intended recipient, do not copy
or disclose its content, but please reply to this email immediately and
highlight the error to the sender and then immediately delete the message.


Re: UDF for sorting

2017-07-04 Thread techpyaasa .
Hi Justin,

Thanks for the reply.
We are using c*-2.1.17 , does lucene plugin works with this version??

On Tue, Jul 4, 2017 at 4:49 AM, Justin Cameron 
wrote:

> While you can't do this with Cassandra, you can get the functionality you
> want with the cassandra-lucene-plugin (https://github.com/Stratio/
> cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#searching
> ).
>
> Keep in mind that as with any secondary index there are
> performance-related limitations: https://github.
> com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/
> documentation.rst#performance-tips
>
> On Tue, 4 Jul 2017 at 07:17 DuyHai Doan  wrote:
>
>> Plain answer is no you can't
>>
>> The reason is that UDF only transform column values on each row but does
>> not have the ability to modify rows ordering
>>
>> On Mon, Jul 3, 2017 at 10:14 PM, techpyaasa . 
>> wrote:
>>
>>> Hi all,
>>>
>>> I have a table like
>>>
>>> CREATE TABLE ks.cf ( pk1 bigint, cc1 bigint, disp_name text , stat_obj
>>> text, status int, PRIMARY KEY (pk1, cc1)) WITH CLUSTERING ORDER BY (cc1 ASC)
>>>
>>> CREATE INDEX idx1 on ks.cf(status);
>>>
>>> I want to have a queries like
>>> *select * from ks.cf  where pk1=123 and cc1=345;*
>>>
>>> and
>>> *select * from ks.cf  where pk1=123 and status=1;*
>>> In this case , I want rows to be sorted based on 'disp_name' (asc/desc) .
>>>
>>> Can I achieve the same using UDF or anything else ?? (Sorry If my
>>> understanding about UDF is wrong).
>>>
>>> Thanks in advance
>>> TechPyaasa
>>>
>>
>> --
>
>
> *Justin Cameron*Senior Software Engineer
>
>
> 
>
>
> This email has been sent on behalf of Instaclustr Pty. Limited (Australia)
> and Instaclustr Inc (USA).
>
> This email and any attachments may contain confidential and legally
> privileged information.  If you are not the intended recipient, do not copy
> or disclose its content, but please reply to this email immediately and
> highlight the error to the sender and then immediately delete the message.
>


Re: UDF for sorting

2017-07-03 Thread Justin Cameron
While you can't do this with Cassandra, you can get the functionality you
want with the cassandra-lucene-plugin (
https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#searching
).

Keep in mind that as with any secondary index there are performance-related
limitations:
https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#performance-tips


On Tue, 4 Jul 2017 at 07:17 DuyHai Doan  wrote:

> Plain answer is no you can't
>
> The reason is that UDF only transform column values on each row but does
> not have the ability to modify rows ordering
>
> On Mon, Jul 3, 2017 at 10:14 PM, techpyaasa . 
> wrote:
>
>> Hi all,
>>
>> I have a table like
>>
>> CREATE TABLE ks.cf ( pk1 bigint, cc1 bigint, disp_name text , stat_obj
>> text, status int, PRIMARY KEY (pk1, cc1)) WITH CLUSTERING ORDER BY (cc1 ASC)
>>
>> CREATE INDEX idx1 on ks.cf(status);
>>
>> I want to have a queries like
>> *select * from ks.cf  where pk1=123 and cc1=345;*
>>
>> and
>> *select * from ks.cf  where pk1=123 and status=1;*
>> In this case , I want rows to be sorted based on 'disp_name' (asc/desc) .
>>
>> Can I achieve the same using UDF or anything else ?? (Sorry If my
>> understanding about UDF is wrong).
>>
>> Thanks in advance
>> TechPyaasa
>>
>
> --


*Justin Cameron*Senior Software Engineer





This email has been sent on behalf of Instaclustr Pty. Limited (Australia)
and Instaclustr Inc (USA).

This email and any attachments may contain confidential and legally
privileged information.  If you are not the intended recipient, do not copy
or disclose its content, but please reply to this email immediately and
highlight the error to the sender and then immediately delete the message.


Re: UDF for sorting

2017-07-03 Thread DuyHai Doan
Plain answer is no you can't

The reason is that UDF only transform column values on each row but does
not have the ability to modify rows ordering

On Mon, Jul 3, 2017 at 10:14 PM, techpyaasa .  wrote:

> Hi all,
>
> I have a table like
>
> CREATE TABLE ks.cf ( pk1 bigint, cc1 bigint, disp_name text , stat_obj
> text, status int, PRIMARY KEY (pk1, cc1)) WITH CLUSTERING ORDER BY (cc1 ASC)
>
> CREATE INDEX idx1 on ks.cf(status);
>
> I want to have a queries like
> *select * from ks.cf  where pk1=123 and cc1=345;*
>
> and
> *select * from ks.cf  where pk1=123 and status=1;*
> In this case , I want rows to be sorted based on 'disp_name' (asc/desc) .
>
> Can I achieve the same using UDF or anything else ?? (Sorry If my
> understanding about UDF is wrong).
>
> Thanks in advance
> TechPyaasa
>