[Xapian-discuss] omega url fetch

Olly Betts olly at survex.com
Thu May 17 15:28:10 BST 2007


On Thu, May 17, 2007 at 10:12:39AM -0400, Michael A. Lewis wrote:
> My report program is written in PHP.

Well, you didn't tell us that...

> I can shell out using the system
> function as with: system('/httpd/cgi-bin/omega FMT=test DB=default
> P=linux HITSPERPAGE=1000"); and then process the output. I
> thought there was a quick way to grab the URL using the document ID
> (or a query) but couldn't locate it in the documentation.

The URL is stored in the document data so you can call $doc->get_data()
and extract the line which starts "url=" (which is what Omega's $field{}
command does).

There's some PHP code to do that here:

http://article.gmane.org/gmane.comp.search.xapian.general/4009

Cheers,
    Olly



More information about the Xapian-discuss mailing list