[Xapian-discuss] omega url fetch

Michael A. Lewis MAL at ICGINC.COM
Thu May 17 15:34:13 BST 2007


Thanks, Olly, that did the trick.
 
-Michael Lewis

________________________________

From: Olly Betts [mailto:olly at survex.com]
Sent: Thu 5/17/2007 10:28 AM
To: Michael A. Lewis
Cc: Xapian Discussion
Subject: Re: [Xapian-discuss] omega url fetch



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