What version of Solr are you using? Because 3.2 (and I believe 3.1) and later
have faceting and range on numeric values, so there would be no need to use
two fields.

And you could then avoid the format thing entirely.

Best
Erick

On Wed, Aug 24, 2011 at 5:53 AM, Oliver Schihin
<oliver.schi...@unibas.ch> wrote:
> Hello list
>
> My documents come with a field holding a date, always a year:
> <year>2008</year
>
> In the schema, this content is taken for a field <year> as an integer, and
> it will be searchable.
>
> Through a copyfield-instruction I move the <year> to a <facet_year>-field,
> you guess, to use it for faceting and make range queries possible. Its field
> type is of the class 'solr.TrieDateField' that requires canonical date
> representation. Is there a way in solr to extend the simple year to
> <facet_year>2008-01-01T00:00:00Z</facet_year>. Or, do i have to solve the
> problem in preprocessing, before posting?
>
> Thanks
> Oliver
>

Reply via email to