null
value and are dropped. For information about how to skip stages when Solr commits are sent, see the Skip JavaScript stages during Solr commits.
Name | Type | Description |
---|---|---|
doc | PipelineDocument | The contents of each document submitted to the pipeline. |
ctx | Context | A reference to the container that holds a map over the pipeline properties. Used to update or modify this information for downstream pipeline stages. |
collection | String | The name of the Fusion collection being indexed or queried. |
solrServer | BufferingSolrServer | The Solr server instance that manages the pipeline’s default Fusion collection. All indexing and query requests are done by calls to methods on this object. See SolrClient for details. |
solrServerFactory | SolrClientFactory | The SolrCluster server used for lookups by collection name which returns a Solr server instance for a that collection, e.g. var productsSolr = solrServerFactory.getSolrServer("products"); |
_context
refers to the same object as ctx
.logger
logger
writes messages to the log file of the server running the pipeline.
This variable is truly global and does not need to be declared as part of the function parameter list.
Since Fusion’s API service does the index pipeline processing, these log messages go into the log file: https://FUSION_HOST:FUSION_PORT/var/log/api/api.log
.
There are 5 methods available, which each take either a single argument (the string message to log) or two arguments (the string message and an exception to log).
The five methods are, “debug”, “info”, “warn”, and “error”.
conditions
field, errors may be generated and Solr commits are dropped because the value is null
. To skip those stages when a Solr commit is sent through the pipeline, add the following condition to those stages: doc.getCommands().size()==0
.
null
or an empty array, it will not be indexed or updated into Fusion.
logger
object for print debugging (in the Fusion connectors log file).cd FUSION_INSTALL_PATH
find . -name "nashorn-0.1-jdk7.jar" -print -exec rm -i {} \;
Java.type()
function: