question about plucene
From: pogi (pogorzem_at_o2.pl)
Date: 10/31/04
- Next message: John Bokma: "Re: Regular Expression confusion"
- Previous message: PerlFAQ Server: "FAQ 8.23: How can I open a pipe both to and from a command?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: John Bokma: "Re: Regular Expression confusion"
- Previous message: PerlFAQ Server: "FAQ 8.23: How can I open a pipe both to and from a command?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]