Skip to content

Script Fields

eliranmoyal edited this page Oct 23, 2015 · 7 revisions

##Script Field Read about how to turn this option on and more about it here

Will be available on 1.4.5

###Syntax And Examples

  1. for simple binary operation script (works with fields and literals) just use:
    select field1 + field2 from indexName where..
    select field1 - 3 from indexName where..
    or in aggregation
    select avg(insertion_time - recieved_time) from dataIndex
  2. for more complex script:
    select script('fieldReturnName','yourGroovyScript') ,moreFields from indexName where ...
  3. if you want to change the language use:
    select script('fieldReturnName','language','yourLangScript')

To escape ' just use '

####Web UI support

  • simple binaryOperator script image
  • Metric aggregation script image
  • full select field script image
Clone this wiki locally