Running a pre-indexer script in Sphinx to copy data from one DB to another
I'm using Sphinx to index a few tables on a Postgres DB. It seems that Sphinx has a pre-index query that you can execute:

http://sphinxsearch.com/docs/manual-0.9.9.html#conf-sql-query-pre

Can this be used to bulk copy-insert data from another DB over a DB link into the DB that I'm indexing? 

    INSERT INTO table1 SELECT * FROM dblink('dbname=db2', 'SELECT * FROM table2 WHERE id = 10') AS t1(id integer, name varchar, address varchar);

Most of the examples I can see are used for settings session parameters so I'm sort of doubtful.

Cheers!
Running a pre-indexer script in Sphinx to copy data from one DB to another
===

I'm using Sphinx to index a few tables on a Postgres DB. It seems that Sphinx has a pre-index query that you can execute:

http://sphinxsearch.com/docs/manual-0.9.9.html#conf-sql-query-pre

Can this be used to bulk copy-insert data from another DB over a DB link into the DB that I'm indexing? 

    INSERT INTO table1 SELECT * FROM dblink('dbname=db2', 'SELECT * FROM table2 WHERE id = 10') AS t1(id integer, name varchar, address varchar);

Most of the examples I can see are used for settings session parameters so I'm sort of doubtful.

Cheers!