elasticdsl icon indicating copy to clipboard operation
elasticdsl copied to clipboard

Prototype of an aggs parser handle.

Open statwonk opened this issue 8 years ago • 6 comments

This is more of a proposal than anything and I don't intend for a merge into master, at least not withstanding major polishing. Here's my little toy code for playing with aggs parsers. It's not recursive, which would be nice to have. @sckott as you'll see there's a departure from your structure. I'm a bit of a newcomer to lazy evaluation, so I'm sure that I'm missing important features. Comments are appreciated!

statwonk avatar Feb 28 '16 17:02 statwonk

I think it might be nice to shoot for a syntax like, aggs(my_statistic = mean(decimalLatitude)) aggs(my_statistics = quantile(decimalLatitude)) aggs(my_terms = terms(play_name))

The challenge comes in with nesting ...

statwonk avatar Feb 29 '16 03:02 statwonk

thanks! I'll have a look in the morning

sckott avatar Feb 29 '16 06:02 sckott

for my own reference: http://adv-r.had.co.nz/dsl.html

statwonk avatar Mar 01 '16 01:03 statwonk

Probably is good, But let me get the https://github.com/ropensci/elasticdsl/issues/6 sorted out first, then it'll be easier to play with this

sckott avatar Mar 01 '16 22:03 sckott

:+1: One thing of mention re: last call, I think a verbose option that would allow the end user see the call construction in json could really help usability.

statwonk avatar Mar 02 '16 00:03 statwonk

yeah, see #12

sckott avatar Mar 02 '16 00:03 sckott