[Xapian-discuss] Am I looking in the right place

James Aylett james-xapian at tartarus.org
Wed Feb 9 17:25:53 GMT 2005


On Wed, Feb 09, 2005 at 05:22:56PM +0000, John Wards wrote:

> > and then write a PHP CLI script that generates a
> > scriptindex data file from your mysql database (it'll take a while to
> > run, but will give you initial population of your database - once
> > you're up and running you can integrate live changes to the Xapian
> > database when you change the mysql db).
> 
> Right I think this might be my last question for a while on this as I am
> getting somewhere.
> 
> This bit James interests me: "you can integrate live changes to the
> Xapian database when you change the mysql db"
> 
> Can you point me in the direction of the Docs that will tell me how to
> do that?

You have to look at the C++ documentation, and then read the PHP
bindings documentation for how to use the library from
PHP. php4/docs/bindings.html has the differences so you know how they
glue together.

I suggest you work through the C++ quickstart guide, which builds up
something similar simpleindex and simplesearch; then, once you're
happy with the basic idea, look at php4/docs/examples.

> See when you said take a while...i've just tired this on my full sized
> live mysql-database..i started 3 hours ago..its still going :-)

Yeah - it has to dump the entire database table; then scriptindex has
to create an entire mirror database of that table inside Xapian. The
latter, depending on the size, isn't always the most efficient it
could be - I know Olly has plans to improve this.

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list