SYNOPSIS

        use Plucene::Document::DateSerializer
        my $field = Plucene::Document::Field->Text(
                date => freeze_date(Time::Piece $t)
        );
        $doc->add($field);

DESCRIPTION

Dates and times in Plucene should be serialized using the \*(C`freeze_date\*(C' function so that the Plucene::Search::DateFilter can filter on them during future searches.

SUBROUTINES

freeze_date

my $string = freeze_date(Time::Piece $t)

This routine, exported by default, turns a \*(C`Time::Piece\*(C' object into a string in a format expected by both Plucene and Lucene.

thaw_date

my Time::Piece $t = Plucene::Document::DateSerializer::thaw_date($string)

This routine is not exported, and is not used by the Plucene core. It is useful for debugging dates, and simply reverses the \*(C`freeze_date\*(C' operation.