Product Selector

Fusion 5.12
    Fusion 5.12

    Managed JavaScriptQuery pipeline stage configuration specifications

    This stage manipulates a query using a script from the blob store. The script must have the blob type file:js-query.

    Uploading a JavaScript blob

    In Managed Fusion 5.12, JavaScript blobs must be uploaded using the Blob Store API, like this:

    curl -u USERNAME:PASSWORD -X PUT -H 'Content-Type: text/javascript' --data-binary @query-pipeline-js-stage.js http://EXAMPLE_COMPANY.lucidworks.cloud/api/apps/APP_NAME/blobs/query-pipeline-js-stage.js?resourceType=file:js-query
    Replace EXAMPLE_COMPANY with the name provided by your Lucidworks representative.

    Open the blob manager to verify that the new blob is present:

    Uploaded JavaScript blob in the blob manager

    Referencing a JavaScript blob

    Use any of the following formats for the ref/Script Reference configuration field:

    query-pipeline-js-stage.js
    blob:query-pipeline-js-stage.js
    urn:x-fusion:blob:query-pipeline-js-stage.js
    The examples above use query-pipeline-js-stage.js as the blob ID.

    Edit JavaScript

    Select Edit in the Script Reference field to edit JavaScript directly in the Managed Fusion UI.

    Configuration

    When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.

    Manipulate the request via JavaScript using a script from the Blob Service. This stage allows to run arbitrary code on the server.

    skip - boolean

    Set to true to skip this stage.

    Default: false

    label - string

    A unique label for this stage.

    <= 255 characters

    condition - string

    Define a conditional script that must result in true or false. This can be used to determine if the stage should process or not.

    shareState - boolean

    Causes all instances of this stage to share global state. Enabling this will increase performance, but can lead to unexpected behavior if any variables are declared globally. This is safe to use if you declare all variables explicitly using 'var'.

    Default: true

    ref - stringrequired

    Reference to a Javascript Blob with Blob type file:js-query.