Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Extracts the name of the function to execute from the $FUNC() block
  2. Calls the specified function using the .invokeFunction() method.

Note:  

Info

$FUNC only has meaning when it encloses the entirety of the string. For calling functions inside $SCRIPT blocks (described above), just invoke the function normally.

 

As Document Metadata iterates over documents to be harvested it passes each document to the Rhino ScriptEngine. The JSON based document passed into the ScriptEngine is then converted into an object via JavaScript's eval() method (i.e.var _doc = eval('document)'). Fields within the document are then available to functions and inline scripts using the JavaScript dot or subscript operators as shown below.

...

Code Block
var s = _value;
Info

...

Each time a value is passed into the ScripEngine the content of _value is over written.

 

Extracting Data from Arrays with _index:

...