Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-13 Thread Gaini Rajeshwar
On Mon, Oct 12, 2009 at 8:02 PM, Ivan Sergio Borgonovo m...@webthatworks.it wrote: On Mon, 12 Oct 2009 19:26:55 +0530 Gaini Rajeshwar raja.rajeshwar2...@gmail.com wrote: Ivan, If i create a tsvector as you mentioned with concatenation operator, my search query will search in any of

[GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Gaini Rajeshwar
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

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Raymond O'Donnell
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

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Raymond O'Donnell
On 12/10/2009 14:23, Raymond O'Donnell wrote: Hoe do you define importance? Whoops... for Hoe read How :-) Ray. -- Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland r...@iol.ie Galway Cathedral Recitals:

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Gaini Rajeshwar
I think you misunderstood my question. let me give clear idea about what i need. I am using PostgreSQL fulltext search (tsearch2) feature to implement searching on database. From readings i came to know that we can give weights to different fields in database something like this:

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
On Mon, 12 Oct 2009 18:46:02 +0530 Gaini Rajeshwar raja.rajeshwar2...@gmail.com 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

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
On Mon, 12 Oct 2009 19:11:01 +0530 Gaini Rajeshwar raja.rajeshwar2...@gmail.com wrote: I think you misunderstood my question. let me give clear idea about what i need. I am using PostgreSQL fulltext search (tsearch2) feature to implement searching on database. From readings i came to know

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Gaini Rajeshwar
Ivan, If i create a tsvector as you mentioned with concatenation operator, my search query will search in any of these fields which are concatenated in my tsvector. For example, if i create tsvector like this, UPDATE document_table SET search_col = setweight(to_tsvector(coalesce(title,'')), 'A')

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
On Mon, 12 Oct 2009 19:26:55 +0530 Gaini Rajeshwar raja.rajeshwar2...@gmail.com wrote: Ivan, If i create a tsvector as you mentioned with concatenation operator, my search query will search in any of these fields which are concatenated in my tsvector. For example, if i create tsvector like

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Gaini Rajeshwar
On Mon, Oct 12, 2009 at 7:26 PM, Ivan Sergio Borgonovo m...@webthatworks.it wrote: On Mon, 12 Oct 2009 19:11:01 +0530 Gaini Rajeshwar raja.rajeshwar2...@gmail.com wrote: I think you misunderstood my question. let me give clear idea about what i need. I am using PostgreSQL fulltext