Comment 0 for bug 1029816

Revision history for this message
UNera (unera) wrote :

Now taratnool builds index by field value.

It would be nice to have indexes by lua function.

example:

function tlen(tuple)
  return #tuple
end

space[1].enabled = 1
space[1].index[0].type = "TREE"
space[1].index[0].unique = 0
space[1].index[0].index_function = tlen

so tarantool should call 'tlen(tuple)' for each tuple while it is building index and while it is doing insert/update operation.

so using the index (in example) we can find largest tuples