Handling Complex queries in PostgreSQL fulltext search

From: Gaini Rajeshwar <raja(dot)rajeshwar2006(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Handling Complex queries in PostgreSQL fulltext search
Date: 2009-11-01 08:50:29
Message-ID: 56b36eb60911010150ybcc227dv6946d23e9bcbeb23@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

Does anyone know how to handle complex queries?

For Example, If i want to search for something like:

*(portable battery AND magnetic induction) OR (database management system)*

This is a sample query and user can specify any kind of complex query in
this way. I can't ask user to specify *&, |, !* operators. Instead i can ask
to use *AND, OR, NOT* operators. If nothing is specified by default
*&*operator should be used.

Is there any way to convert/specify user given query in Fulltext Search.

For Example, In Sphinx I can give the same query as

*'(portable battery && magnetic induction) | (database management system)'

*Here i need not to mention the & operator between *portable, battery.

*Is there any way we can specify this in PostgreSQL Fulltext search (i.e
without bothering about inserting & operator in between)?

Thanks,

Gaini Rajeshwar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2009-11-01 09:21:11 Re: Handling Complex queries in PostgreSQL fulltext search
Previous Message Craig Ringer 2009-11-01 07:04:16 Re: What order of steps of the postgres when you change information in the table?