On 12/10/2009 14:16, Gaini Rajeshwar wrote: > Hi, > is there a way to rank the search results based on multiple fields in > postgreSQL? > For example, > i have *title*, *abstract*, *summary*, *body* as fields/columns in my > database. When user searches on *title*, i want to rank the results based on > *title* field as well as *summary* field, where importance(summary) > > importance(title). But the results should be exactly matching the terms in > "title" rather than "title" OR "summary" > Hoe do you define "importance"? You can order the results alphabetically/numerically on as many columns as you like - for example, select .... where title = .... order by title, summary will order the results on title first, then summary... though you probably know this and I'm misunderstanding what you need. A little more detail will help. Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@xxxxxx Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general