Re: [HACKERS] Using GIN/Gist to search the union of two indexes?

2010-03-06 Thread Dimitri Fontaine
Jesper Krogh jes...@krogh.cc writes: select id from tablea,tableb where tablea.tableb_id = tableb.id and tablea.text @@ to_tsquery('ftsquery') or tableb.text @@ to_tsquery('ftsquery'); This one is doable .. using some mocking of queries in the application. But if ftsquery is: terma termb

[HACKERS] Using GIN/Gist to search the union of two indexes?

2010-03-05 Thread Jesper Krogh
Hi. How complicated would it be to make postgresql-fts search the union of several GIN/Gist indexes. The use-case is that you have two tables: tablea(id serial, tableb_id int, text tsvector); and tableb(id serial, text tsvector); and indices on both tsvectors. The typical query would join the