← Back to team overview

u1db-discuss team mailing list archive

Re: Some view functions to ponder

 

On 07/17/2012 02:34 PM, John Meinel wrote:

It does seem like a place where user defined funcs could work. (Here are some documents, give us a string to index on). Now whether the complexity of supporting user defined functions is worth the effort..



It is always possible to do user define functions by hand.
1- When adding an index iterate over all docs and add a field index_name = udf(doc)
2- Before saving a doc update the field.
3- create an index on the new field.

And now that we have document factories, this is even easier. So everything except reduce is possible, although not necessarily straight forward.

If we see this pattern of usage emerge, we can then invest in user defined functions for indexes.

Lucio.


References