Hello James, I did a search using PHOENIX-1544 and could not find any updates to your June 2015 post on the Phoenix list, so I wanted to ask: what is the current status for indexing array fields over immutable (or even mutable) tables? We could certainly use such.
Ron On 2015/06/21 23:10:04, James Taylor <j...@apache.org<mailto:j...@apache.org>> wrote: > Hey Leon,> > I filed PHOENIX-1544 a while back for indexing arrays over immutable> > tables. If you're interested in contributing a patch, that'd be great.> > I'm happy to help you along the way.> > Thanks,> > James> > > On Sun, Jun 21, 2015 at 12:48 AM, Leon Prouger > <le...@gmail.com<mailto:le...@gmail.com>> wrote:> > > Hey James, thank you for replying.> > > Yes you're right, this option is pretty useless is our case. We've been> > > thinking to create a separate table which will model the array with one to> > > many relation, then index it and perform join with the main table for every> > > query. Like:> > >> > > Main table: PK(id), data columns> > > Array table: PK(id, array cell), index of the array cell> > >> > > But I wonder is the join gonna be faster then full scan of the main table.> > >> > > Is there any plans for implementing an array index? Maybe it can be done > > for> > > immutable tables only.> > >> > >> > > On Wed, Jun 17, 2015 at 10:05 PM James Taylor > > <ja...@apache.org<mailto:ja...@apache.org>>> > > wrote:> > >>> > >> Hey Leon,> > >> You can have an array in an index, but it has to be at the end of the> > >> PK constraint which is not very useful and likely not what you want -> > >> it'd essentially be equivalent of having the array at the end of your> > >> primary key constraint.> > >>> > >> The other alternative I can think of that may be more useful is to use> > >> functional indexing[1] on specific array elements. You'd need to know> > >> the position of the element that you're indexing and querying against> > >> in advance, though.> > >>> > >> [1] http://phoenix.apache.org/secondary_indexing.html#Functional_Index> > >>> > >> On Wed, Jun 17, 2015 at 4:43 AM, Leon Prouger > >> <le...@gmail.com<mailto:le...@gmail.com>> wrote:> > >> > Hey folks,> > >> >> > >> > Maybe I'm asking too much but I couldn't find a straight answer. Is this> > >> > possible to index an array type with Phoenix?> > >> >> > >> > If I can't does anybody tried any alternatives? Like keeping another> > >> > table> > >> > for the array many to one relation> > Ronald C. Taylor, Ph.D. Divisions of Immunobiology and Biomedical Informatics Cincinnati Children's Hospital Medical Center Office phone: 513-803-4880 Cell phone: 509-783-7308 Email: ronald.tay...@cchmc.org<mailto:ronald.tay...@cchmc.org>