Any way to parse timestamp into a date field

2014-06-29 Thread Alexandre Rafalovitch
Hello,

My data comes with the timestamp 12345654. I want that indexed as a date.

It does not seem to be happening with default date type and none of
the URPs seem to recognize that format.

Is there something terribly obvious I am missing?

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency


Re: Any way to parse timestamp into a date field

2014-06-29 Thread Shalin Shekhar Mangar
If you're using Solrj then you can just add the Date object to
SolrInputDocument and everything will be taken care of. But if you are
directly uploading data with a date like that then the only option is to
use a ScriptUpdateProcessor to convert the long to a java Date.


On Sun, Jun 29, 2014 at 4:00 PM, Alexandre Rafalovitch 
wrote:

> Hello,
>
> My data comes with the timestamp 12345654. I want that indexed as a date.
>
> It does not seem to be happening with default date type and none of
> the URPs seem to recognize that format.
>
> Is there something terribly obvious I am missing?
>
> Regards,
>Alex.
> Personal website: http://www.outerthoughts.com/
> Current project: http://www.solr-start.com/ - Accelerating your Solr
> proficiency
>



-- 
Regards,
Shalin Shekhar Mangar.


Re: Any way to parse timestamp into a date field

2014-06-29 Thread Jack Krupansky
It would be nice to have "unformatted" or "timestamp" or "long" (maybe all 
three) as an accepted format for the parse date update processor. Seems like 
a reasonable use case. But... the standard use of parsing is to chain the 
types in a hierarchy, with date and then numbers, so that would cause the 
date update processor to gobble up plain numbers since that processing is 
not based on actual schema field type. So, what is really needed is for 
TrieDateField itself to recognize a pure numeric as a timestamp. My personal 
preference would be for TrieDateField to support all the common date formats 
anyway, eliminating the need for the parse date update processor - a Solr 
band-aid to cover the weakness of the Lucene feature.


-- Jack Krupansky

-Original Message- 
From: Shalin Shekhar Mangar

Sent: Sunday, June 29, 2014 6:43 AM
To: solr-user@lucene.apache.org
Subject: Re: Any way to parse timestamp into a date field

If you're using Solrj then you can just add the Date object to
SolrInputDocument and everything will be taken care of. But if you are
directly uploading data with a date like that then the only option is to
use a ScriptUpdateProcessor to convert the long to a java Date.


On Sun, Jun 29, 2014 at 4:00 PM, Alexandre Rafalovitch 
wrote:


Hello,

My data comes with the timestamp 12345654. I want that indexed as a date.

It does not seem to be happening with default date type and none of
the URPs seem to recognize that format.

Is there something terribly obvious I am missing?

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr
proficiency





--
Regards,
Shalin Shekhar Mangar.