Search code examples
postgresqlfull-text-searchsphinx

Is it possible to use sphinxsearch with postgresql directly wihtout defining index for each table


I have a postgresql database and i want to use sphinx search heavily to get a lot of data from many tables (more than 30 table) , do i have to define index for each table or i can just define listen socket and it will work fine?

I tried the normal way which is define index for each table and it's working fine but i have to define the index for all tables!

I'm trying to define listen on the searchd section on sphinx.conf but it's not working.


Solution

  • No. Sphinx doesn't have 'auto-indexes'. They have to be created explicitly.

    Frankly the variations are too many. What fields to include, what rows to include (eg exclude 'deleted' rows) etc. What attributes should be included . Too much to be deduced universally.

    Having said that, the config file can be created by code. So the code knows how how you want each index to work, so just generates the config file automatically. But its probably only worth the trouble if your tables change regually.