Plucene::Document::DateSerializer(3pm)

Plucene::Document::DateSerializer3pm

Utility functions for dealing with dates

Usage

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

Overview

Dates and times in Plucene should be serialized using the "freeze_date" 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 "Time::Piece" 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 "freeze_date" operation.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0
  4. 7–9
  5. 10–11
  6. 12–13

From libplucene-perl 1.25-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.