Re: External search engine, advice - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: External search engine, advice
Date
Msg-id 20010519120528T.t-ishii@sra.co.jp
Whole thread Raw
In response to External search engine, advice  (mlw <markw@mohawksoft.com>)
List pgsql-hackers
> I have an external search engine system which plugs in to postgres. I use a few
> C functions to interface the search daemon with the Postgres back-end.
> 
> The best that I have been able to do is do a "select" for each result. I have a
> live demo/test site:
> 
> http://www.mohawksoft.com/search.php3, and the PHP source code is at
> http://www.mohawksoft.com/ftss_example.txt.
> 
> I would love to get the results with one select statement, but have, to date,
> been unable to figure out how. Anyone with any ideas?

It's possible to return a set of results from C functions using the
new function manager in 7.1 or later. Take a look at following email
in the archive.

Subject: Re: [INTERFACES] Re: can external C-function get multiple rows? 
From: Tom Lane <tgl@sss.pgh.pa.us>
To: alexey@price.ru
cc: pgsql-interfaces@postgresql.org
Date: Mon, 30 Apr 2001 01:52:57 -0400

Actually I have created such a function calling an external full text
search engine called "namazu". Here is an example to search a keyword
"int8" from index files pre-generated by namazu.

test=# select pgnmzsrch('int8','/home/t-ishii/lib/namazu/hackers');               ?column?                

----------------------------------------/home/t-ishii/lib/namazu/hackers/21000/home/t-ishii/lib/namazu/hackers/21001/home/t-ishii/lib/namazu/hackers/21003/home/t-ishii/lib/namazu/hackers/21004/home/t-ishii/lib/namazu/hackers/21002/home/t-ishii/lib/namazu/hackers/21005/home/t-ishii/lib/namazu/hackers/21006
(7 rows)
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: Interesting question
Next
From: Bruce Momjian
Date:
Subject: Re: Plans for solving the VACUUM problem