Search (select) options

From: Jeff Davis <jdavis(at)genesiswd(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Search (select) options
Date: 2000-08-16 04:05:55
Message-ID: 399A1323.D58E9EE2@genesiswd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I would like to be able to use searches that seem somewhat intelligent.
Can you 'ORDER BY' number of matching 'OR' clauses? For example, someone
searches for "x y z", so I would do "select * from mytable where col1
like '%x%' or col1 like '%y%' or col1 like '%z%';", but I want it to
order by number of matches (so a match of y and z would turn up before a
match of just x).

If anyone has suggestions, or can point me to some reading, I would
really appreciate it. The only thing I can think of is a complicated
application-side program.

Thanks,
Jeff Davis

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Turner 2000-08-16 04:57:39 Re: Referential integrity
Previous Message Don Baccus 2000-08-16 03:39:36 Re: Open Source Database Routs Competition in New BenchmarkTests