I use an application that stores data to solr. Unfortunately this one can only write single-values to solr. But some of the data have multiple date-values. So to search them I need them in a multivalue date field.
I already had this problem with some string-values, but solved it by joining the values with an separator (so that it can be transfered as one string) and then using solr.PatternTokenizerFactory.
Thus I tried the same with a multivalued date field, but solr refuses this:
FieldType: TrieDateField does not support specifying an analyzer
Are there any options left to solve this on the solr-side?
tldr: Is there any way to get multivalued dates
2015-07-29T16:50:00Z
2016-04-08T18:15:00Z
out of
2015-07-29T16:50:00Z$2016-04-08T18:15:00Z
Thanks in advance!
[EDIT]
sanjayduttindia was right. It works great! Finally I had to set the arrays values in an iteration..
function processAdd(cmd) {
doc = cmd.solrDoc;
id = doc.getFieldValue("id");
multiDate = doc.getFieldValue("sendebeginn_raw");
dates = multiDate.split("$");
dates.forEach(function (item) {
doc.addField("sendebeginn", item);
});
logger.info("UpdateScript processed: "+id);
}