-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Script Fields
shiyuan edited this page Jan 5, 2018
·
7 revisions
Read about how to turn this option on and more about it here
- 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
- for more complex script:
select script('fieldReturnName','yourGroovyScript') ,moreFields from indexName where ...
- if you want to change the language use:
select script('fieldReturnName','language','yourLangScript')
To escape ' just use '
- simple binaryOperator script
- Metric aggregation script
- full select field script