Skip to content

Script Fields

shiyuan edited this page Jan 5, 2018 · 7 revisions

Script Field

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

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 
  1. for more complex script:
select script('fieldReturnName','yourGroovyScript') ,moreFields from indexName where ...
  1. 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