Skip to content

Server Side JavaScript filters

Jim Ancona edited this page Jun 9, 2013 · 1 revision

It is possible to supply JavaScript as a filtering language instead of groovy.

{
    "type": "CREATEFILTER",
    "op": {
        "name": "stouts",
        "spec": "javascript",
        "value": "function(row) { if (row['value'] == 'Breakfast Stout') return row; else return null; }"
    }
},

The Rhino library is used server side compile the java function and apply it.

Clone this wiki locally