Re: Custom Java class for secondary index implementation

2016-03-06 Thread Henry Manasseh
Thank you. This is a perfect class for to start experimenting with.


On Sun, Mar 6, 2016 at 2:38 PM Sam Tunnicliffe  wrote:

> You might find o.a.c.i.StubIndex in the test source tree useful.
> On 6 Mar 2016 19:24, "Henry Manasseh"  wrote:
>
> > Hello,
> > I was wondering if anyone is aware of a minimal reference implementation
> > for a java class implementing a secondary index or some documentation of
> > the interface(s) I would need to implement (I looked at the SASI 2i code
> > but I am trying to find the bare bones test or sample class for a newbie
> if
> > it exists).
> >
> > e.g. I am referring to the class you would use for
> > 'path.to.the.IndexClass'.
> >
> > CREATE CUSTOM INDEX ON users (email) USING 'path.to.the.IndexClass';
> > >
> >
> >
> > I am trying to understand if it is possible to index a UDT collection
> based
> > on only one field of the UDT and still use the cassandra index file
> > management (I don't want to provide my own file storage). In other
> words, I
> > am looking to see if the custom index class can serve as a transformation
> > function to only index my subfield. This probably will need a tweak to
> the
> > CQL to prevent a syntax error but not concerned about that at the moment.
> >
> > Thank you for any helps and tips,
> > Henry
> >
>


Re: Custom Java class for secondary index implementation

2016-03-06 Thread Sam Tunnicliffe
You might find o.a.c.i.StubIndex in the test source tree useful.
On 6 Mar 2016 19:24, "Henry Manasseh"  wrote:

> Hello,
> I was wondering if anyone is aware of a minimal reference implementation
> for a java class implementing a secondary index or some documentation of
> the interface(s) I would need to implement (I looked at the SASI 2i code
> but I am trying to find the bare bones test or sample class for a newbie if
> it exists).
>
> e.g. I am referring to the class you would use for
> 'path.to.the.IndexClass'.
>
> CREATE CUSTOM INDEX ON users (email) USING 'path.to.the.IndexClass';
> >
>
>
> I am trying to understand if it is possible to index a UDT collection based
> on only one field of the UDT and still use the cassandra index file
> management (I don't want to provide my own file storage). In other words, I
> am looking to see if the custom index class can serve as a transformation
> function to only index my subfield. This probably will need a tweak to the
> CQL to prevent a syntax error but not concerned about that at the moment.
>
> Thank you for any helps and tips,
> Henry
>