My initial request was about a way to build up a tsquery that was
made similar to what plainto_tsquery does but using | inspite of
as a glue.
But at the end of the day I'd like to find similar tsvectors and
rank them.
I've a table containing several fields that contribute to build up a
weighted
Ivan,
You can write function to get lexemes from tsvector:
CREATE OR REPLACE FUNCTION ts_stat(tsvector, weights text, OUT word text, OUT
ndoc
integer, OUT nentry integer)
RETURNS SETOF record AS
$$
SELECT ts_stat('SELECT ' || quote_literal( $1::text ) || '::tsvector',
quote_literal(
On Sun, 17 Jan 2010 20:19:59 +0300 (MSK)
Oleg Bartunov o...@sai.msu.su wrote:
Ivan,
You can write function to get lexemes from tsvector:
CREATE OR REPLACE FUNCTION ts_stat(tsvector, weights text, OUT
word text, OUT ndoc integer, OUT nentry integer)
RETURNS SETOF record AS
$$
SELECT
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
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
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
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:
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:
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
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
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')
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
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
Since there is no current solution to ranking values in pl/pgsql as the
rank() over (partition by... that there is in oracle i am hoping someone
can help me out here.
The table i created contains the following columns:
rank | value
I wrote a cursor that will give me all the
On Fri, Aug 22, 2008 at 02:30:46PM -0700, Ruben Gouveia wrote:
Since there is no current solution to ranking values in pl/pgsql as
the rank() over (partition by... that there is in oracle i am hoping
someone can help me out here.
It seems likely that the windowing functions patch will get
On Sep 13, 2005, at 3:07 PM, Craig wrote: Hi I have a query that is grouping by 3 fields and returning a sum of another field. I would also like a further field to be returned that shows a ranking for the records based on the sum field. This should really only be a numbering of the rows
Hi
I have a query that is grouping by 3 fields and
returning a sum of another field. I would also like a further field to be
returned that shows a ranking for the records based on the sum field. This
should really only be a numbering of the rows returned, since I will do the
ordering in an
I hope this helps someone else ... I had struggled some time ago with
attempts to get a rank of values query to work, but then I gave up and
set it aside. I had another reason to attack it, and in between then and
now I learned how to return setof values from a function, as well as
how to
Gah, I'm dreadfully sorry. The original functions were cut-and-pasted
from a \df+ window, which meant they lost their quoted-ness, which
means if you try to cut and paste from my message to a SQL prompt,
you'll be sorely disappointed. Below are the edited versions.
create table
19 matches
Mail list logo