Product Selector

Fusion 5.9
    Fusion 5.9

    Custom JavaScript stages for query pipelines

    The JavaScript Query stage allows you to write custom processing logic using JavaScript to manipulate search requests and responses. The first time that the pipeline is run, Managed Fusion compiles the JavaScript program into Java bytecode using the JDK’s JavaScript engine.

    The JavaScript Query stage allows you to run JavaScript functions over search requests and responses by manipulating variables called "request" and "response" which are Request objects and Response objects, respectively.

    Users who can create or modify code obtain access to the broader Managed Fusion environment. This access can be used to create intentional or unintentional damage to Managed Fusion.

    The JavaScript engine used by Managed Fusion

    The JavaScript engine used by Managed Fusion is the Nashorn engine from Oracle. See The Nashorn Java API for details.

    Additional resources

    Lucidworks offers free training to help you get started.

    The Course for JavaScript in Fusion focuses on how to leverage JavaScript in Fusion to build powerful and responsive scripts at index and query time:

    JavaScript in Fusion

    Visit the LucidAcademy to see the full training catalog.