Re: Mango Functions & Values

2022-01-25 Thread Jan Lehnardt
Hey all, my colleague James took this a bit further and made a jq Nif and extended Mango so we can build indexes from jq expressions. There is a demo PR here: https://github.com/apache/couchdb/pull/3912 We’d love your feedback, Best Jan —

Re: Mango Functions & Values

2021-12-03 Thread Jan Lehnardt
Heya Glynn, I’ve been playing with this at work a bit and a coworker suggested something that looks quite a bit what you’re proposing. I’m happy to take the lead on producing an RFC in the next couple of weeks, so we can hammer this out. Ideally, we want to make it so that our declarative VDU

Re: Mango Functions & Values

2021-12-03 Thread Glynn Bird
I think Mango needs _something_ to allow folks to process data between the document and the index - thanks for posting Jan!. I had a think about this and came up with another simpler syntax which is in this gist: https://gist.github.com/glynnbird/ad932de13eb0e276e6ffab5fcaa350f8 Cheers Glynn

Re: Mango Functions & Values

2021-11-26 Thread Adam Kocoloski
Hi Jan, good stuff. I think it’s worth expanding into an RFC if this is a limitation that you see users bumping into frequently. Some thoughts: - We’ll want to address the case where a virtual field clashes with a “physical" field in a doc. Should the value of the virtual field override the

Mango Functions & Values

2021-11-23 Thread Jan Lehnardt
Hi all, I had some time playing with an idea that I wanted to see happen for a long time: value manipulation functions for Mango. The goal here is to allow more flexible indexing with Mango. It’ll not be a super flexible solution like JS views, but I think it is a neat addition. I’ve drafted