Displaying 1 result from an estimated 1 matches for "csvline".
Did you mean:
cmdline
2014 Jan 27
4
Perl Search::Xapian
...);
# setup TermGenerator that'll be used in indexing.
my $tg = Search::Xapian::TermGenerator->new();
$tg->set_stemmer(Search::Xapian::Stem->new('en'));
# here is a for to loop thru all the csv? file.
my $fh = Tie::Handle::CSV->new($csvfile, header => 1);
while (my $csvline = <$fh>) {
my $description = $csvline->{DESCRIPTION};
my $title = $csvline->{TITLE};
my $identifier = $csvline->{id_NUMBER};
# We make a doc and tell the term generator to use this.
my $doc = Search::Xapian::Document->new();
$tg->set_document($doc);...