question about plucene

From: pogi (pogorzem_at_o2.pl)
Date: 10/31/04


Date: Sun, 31 Oct 2004 18:47:54 +0100

Can you help me with plucene?
I've create index, and make simple search use Plucene::Simple. It worked ok,
I think, but I don't know how to print author and title fields when I find
id's.

this is my code:

create index:
------------
use Plucene::Simple;

$index_path="index";

my $plucy = Plucene::Simple->open($index_path);

$plucy->add(
        id1 => {
                author => "authorfirst",
                title  => "titlefirst",
        },
        id2 => {
                author => "authorsecond",
                title => "titlesecond"
        },
        id3 => {
                 author => "authorfirst",
                 title => "titlethird"
        },

);

serching index:
-----------

use Plucene::Simple;

$index_path='index';
$search_string="authorfirst";
$search_string2="titlethird";

my $plucy = Plucene::Simple->open($index_path);

my @result = $plucy->search($search_string);

print @result;

my @result = $plucy->search("author:$search_string AND title:
$search_string2");

print @result;

Thanks,
Maciej