Making a function (FuncNode?) use an index

7 views
Skip to first unread message

mkeb...@gmail.com

unread,
Feb 20, 2014, 12:57:59 PM2/20/14
to num...@googlegroups.com
Hello,

I've created a table with StringCol and I'd like to make my contains() operator use index I created on it. It seems like an index is working, because:

    print doctable.will_query_use_indexing("""W == 'variable'""")

results in: frozenset(['W']).


But:

    print doctable.will_query_use_indexing("""contains(W, 'variable')""")

results in: indexing? frozenset([])


So while the query like this one works and returns expected results, it probably does not use indexes:

n = [x['W'] for x in doctable.where("""contains(W, 'variable')""")]


Is there a way for me to make "contains()" use an index just like "==" operator seems to use it?


Regards,
mk

mkeb...@gmail.com

unread,
Feb 20, 2014, 12:59:30 PM2/20/14
to num...@googlegroups.com
P.S. I realize this should rather be a question for Pytables group, but I wonder if there's something I should do on the numexpr side that enables indexing on Pytables side?

Reply all
Reply to author
Forward
0 new messages