HI Eric,

i have a schema with a date field (tweetedDate) with  10-23-2017 10:15:00
format. Same schema is used with number of collections. i have to index the
date field with different formats in different collections.

lets says collections as collection-day, collection-hour, etc

if the date field( tweetedDate) value is  10-23-2017 10:15:00
date format in collection day -  10-23-2017 *00:00:00*

* date format in collection hour -  10-23-2017 10:00:00 *

so that i can use that date field for faceting for aggregation.

my idea is to create new date field (newTweetedDate)  which holds the
transformed value which is used for aggregation.

One way of indexing newTweetedDate is to perform the transformation based
on collection and set to solr document for indexing.
I am checking if there is any other alternative way where newTweetedDate is
derived from tweetedDate automatically using schema using copyField or some
other feature.

Hope this is clear. thanks.

Regards,
Anil



On 12 July 2018 at 23:04, Erick Erickson <erickerick...@gmail.com> wrote:

> This seems like an XY problem, you've asked how to do X without
> explaining _why_ (the Y).
>
> If this is just because you want to search the field without having
> to specify the full string, consider a DateRangeField.
>
> Best,
> Erick
>
> On Thu, Jul 12, 2018 at 10:22 AM, Anil <anilk...@gmail.com> wrote:
> > HI,
> >
> > i have a date field which needs to copied to different field with
> different
> > format/value. is there any way  to achieve this using copy field ? or
> needs
> > to be done when creating solr document itself.
> >
> > lets say createdDate is 10-23-2017 10:15:00, it needs to be copied to
> > transformedDate field as  10-23-2017.
> >
> > please help. thanks.
> >
> > Regards,
> > Anil
>

Reply via email to