469,167 Members | 1,453 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

any solution for full text search in Postgres for partial words

Sorry if this question has been asked before. I tried to search in postgres mailing lists at http://archives.postgresql.org/pgsql-general/ just now and it gave me error "An error occured! Can not connect to search daemon".

Anyway I installed tsearch2 and openFTS and was able to do some searches. However, when I checked searching partial words, it of course does not work(unless the partial word just happens to be the indexed version). IMHO, this is a significant drawback for the FTI as compared to the plain "select * from a where b ilike '%abc%'" which could find the partial words and would not disappoint web users who tried partial words searching. So my question's three-fold:

1. Is there existing open-source FTI for postgres that allows partial wordssearch?
2. What's the main advantage of tsearch2 over plain sql in searching full text besides speed? For the DB I'm working on the performance of plain sql is just fine even if I use "where col1 ilike '%abc%' or col2 ilike '%abc%' or ...', so my thinking is that I might be better off using just sql.
3. Is there a way to define whole-postgres-DB full text search with tsearch2 or openFTS? This would be convenient, and should be used by many postgres-DB-supported sites, although not essential.

BTW, I know I can ask the question on the openFTS mailing list too, but that list seems to be used fairly infrequently. It is also more general than openFTS and more related to postgreSQL solutions.



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
1 3270
On Wed, Aug 25, 2004 at 11:14:36AM -0400, Liu, Mingyi wrote:
1. Is there existing open-source FTI for postgres that allows partial words search?

I think a trigram-based solution could help you here. In 8.0beta there
is a contrib/pg_trgm module that implements such a thing. It isn't
present on previous versions of Postgres though.


Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Hi! I'm a .signature virus!
cp me into your .signature file to help me spread!
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Sjef Janssen | last post: by
3 posts views Thread by Trevor Fairchild | last post: by
3 posts views Thread by Matthias HALDIMANN | last post: by
reply views Thread by Aquila Deus | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.