On 4/14/2010 8:12 AM, Shawn Heisey wrote:
On 4/12/2010 9:29 PM, Lance Norskog wrote:
During indexing: the basic Solr XmlUpdateHandler does not have a
facility for this. In the DataImportHandler you can add Javascript
that takes your 'seconds since epoch', adds the delta between your
epoch and 1/1/1970, and multiplies by 1000.

I had hoped there was a way to tell schema.xml to do the math, but this sounds like there isn't. If you could point me at some examples of how to put javascript into data-config.xml, then I could probably work out how to do the javascript that I would need. I might be able to alter my SQL query in the DIH config to multiply the value by 1000, but that puts all the load on the SQL server instead of utilizing the multiple CPUs involved in my shards. I'm pretty sure that the epoch on my dates is also 1970/01/01.

What I'd truly like is a way to convert it directly to tdate, so all of Solr's date capabilities become available. Is that nontrivial, or is that perhaps what you've been already describing?

Thanks for all the help you've given so far. I've made a lot of progress.


Reply via email to