[Xapian-discuss] PHP indexing, what's the PHP method for indexscript

James Aylett james-xapian at tartarus.org
Tue Jan 15 21:47:09 GMT 2008


On Tue, Jan 15, 2008 at 01:04:10PM -0800, athlon athlonf wrote:

> How can I create the same indexing using PHP?  With this, I can get
> an searchable index, but I have no idea how to set the fields, so
> that I can actually GET something back (with the underneath code, I
> just get a bunch of pid's back).
> 
> $doc = new XapianDocument();
> $doc->set_data($postrow['pid']);    

You're setting the document data field to just the pid. If you want it
to be compatible with omega, you'll need to put the right data in
there, as documented in ``Document data construction'' in
omega/docs/overview.html. Alternatively, if you're using your own
searcher, you could pull data out of wherever it came from to display
it and cut down on data duplication - which makes more sense depends
on a huge number of factors. The former is the easier to migrate
gradually from the omega tools to your own system.

J

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



More information about the Xapian-discuss mailing list