<div>Hi,</div>
<div> </div>
<div>Thank you all for emailing some answers to my question. I put together simple Perl script so we do not keep asking the same thing over. As you can see I had to parse the document data and try to find where is title, body and url. If someone knows something that was not yet documented and retrieves the specific document attribute (title,body,url) let me know.
</div>
<div> </div>
<div>
<div>#--------------------------------------------------------- begin of the script -----------------------------------------------#</div></div>
<div>
<p> my $db = Search::Xapian::Database->new( '/europa' );<br> my $qp = Search::Xapian::QueryParser->new();<br> my $enq = $db->enquire($qp->parse_query($terms));<br> my $total = $db->get_termfreq($terms);
</p>
<p><br> printf "Searching for: '%s' ", $terms; <br> print "Total matches found" . $total; <br> </p>
<p> #--- display only range of documents for pagination ----# <br> my @matches = $enq->matches($start, $end); </p>
<p> my($doc,$html,$body,$title,$url);</p>
<p><br> foreach my $match ( @matches )<br> {<br> $doc = $match->get_document();<br> $html = $doc->get_data();<br> <br> $html =~ m/body=(.*)/; $body = $1;<br> $html =~ m/title=(.*)/; $title = $1;
<br> $html =~ m/url=(.*)/; $url = $1;<br> <br> printf "<table border=0 width=95%><tr><td><font size=2 face=Verdana>Relevance: %s%&nbsp;&nbsp;", $match->get_percent();
<br> print "<a href=\"$url\" target=_blank><b>$title</b><BR><i>$url</i></a><BR>$body";<br> print "</font></td></tr></table><P>";
<br> }<br></p>
<div>#--------------------------------------------------------- end of the script -----------------------------------------------#</div>
<div> </div>
<div> </div></div>