Hey folks, I was contemplating having a LIKE type search on Secondary
Indexes.

LIKE_S, S_LIKE and S_LIKE_S (similiar to LIKE '%eg', 'eg% and '%eg%'

I am not sure if this has already been discussed or even an existing JIRA or
maybe something maybe I could contribute myself?

It looks like the best way to-do this would be to add some additional
properties to IndexExpression so we know we want to-do a LIKE check

pseudo coding my thoughts taking this from ColumnFamilyStore

int v =
data.metadata().getValueValidator(expression.column_name).compare(column.value(),
expression.value);
            if (!satisfies(v, expression.op))
                return false;

and make it something like this

if (expression.LIKE) {
 if (!column.MakeItAStringValue().equalsIgnoreCase(express.value))  //this
would actually fall into a switch for S_LIKE, LIKE_S, S_LIKE_S
    return false;
else {
int v =
data.metadata().getValueValidator(expression.column_name).compare(column.value(),
expression.value);
            if (!satisfies(v, expression.op))
                return false;
}

am i on the right track?  smoking crack?

let me know please

/*
Joe Stein
http://www.linkedin.com/in/charmalloc
Twitter: @allthingshadoop
*/

Reply via email to