Re: Ranking search results using multiple fields in PostgreSQL fulltext search
| От | Raymond O'Donnell |
|---|---|
| Тема | Re: Ranking search results using multiple fields in PostgreSQL fulltext search |
| Дата | |
| Msg-id | 4AD32DEC.1030604@iol.ie обсуждение исходный текст |
| Ответ на | Ranking search results using multiple fields in PostgreSQL fulltext search (Gaini Rajeshwar <raja.rajeshwar2006@gmail.com>) |
| Ответы |
Re: Ranking search results using multiple fields in PostgreSQL
fulltext search
Re: Ranking search results using multiple fields in PostgreSQL fulltext search |
| Список | pgsql-general |
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@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
В списке pgsql-general по дате отправления: