[Xapian-discuss] More than one Index?

John Wards j.wards at sportnetwork.net
Mon Jan 30 15:17:50 GMT 2006


On Mon, 2006-01-30 at 14:11 +0000, James Aylett wrote:
> On Mon, Jan 30, 2006 at 01:34:13PM +0000, John Wards wrote:
> 
> > How do I get to allterms_begin() in PHP? 
> 
> $db = /* construct it here */;
> $ati = $db->allterms_begin();
>  

Right sort of got a bit further but I know I am lost...(again)

$database = new_Database("/home2/omega/boris2");
$item = database_allterms_begin($database);

while (! termiterator_equals ($item, database_allterms_end ($database)))
{
        echo  "[Wdf: " . termiterator_get_wdf ($item) .
                 " - freq: " . termiterator_get_termfreq ($item) .
                 " - desc: " . termiterator_get_description ($item) .
"]";
        termiterator_next($item);
}

The while loop is rubbish and doesn't work I know as its just guessed
from looking at the mset iterator in the simple search example

Can someone prod me in the right direction? I would like to see a list
of the terms and the frequency of them...




More information about the Xapian-discuss mailing list