I need to convert a field say,timestamp_ms(ex: 1473794840429) which is in long data type to solr date format yyyy-mm-ddThh:mm:ssZ through Solr ScriptUpdateProcessor.
Below is my solrconfig.xml
<processor name="script" class="solr.StatelessScriptUpdateProcessorFactory">
<str name="script">date-update.js</str>
</processor>
and my date-update.js is:
function processAdd(cmd) {
doc = cmd.solrDoc; // org.apache.solr.common.SolrInputDocument
var datecheck = doc.getFieldValue("timestamp_ms");
var date1 = new Date(datecheck);
var date2= date1.toUTCString();
doc.setField("tweet_date",date2);
}
-date2 is stored as string datatype.
When I reload the core and post documents I get the below error:
org.apache.solr.common.SolrException: RunUpdateProcessor has received an AddUpdateCommand containing a document that appears to still contain Atomic document update operations, most likely because DistributedUpdateProcessorFactory was explicitly disabled from this updateRequestProcessorChain
How do I solve this?