Re: postgresql & Fulltext & ranking & my own functions

From: Nicolas Paris <niparisco(at)gmail(dot)com>
To: obartunov(at)gmail(dot)com
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgresql & Fulltext & ranking & my own functions
Date: 2016-05-03 14:15:35
Message-ID: CA+ssMOTtC_PssXRaMFC6hWj9ixbxXFbKuqO0zTFcpZsSo2eC+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Oleg, this is a good start for me

2016-05-03 15:47 GMT+02:00 Oleg Bartunov <obartunov(at)gmail(dot)com>:

>
>
> On Tue, May 3, 2016 at 3:21 PM, Nicolas Paris <niparisco(at)gmail(dot)com> wrote:
>
>> Hello,
>>
>> Documentation says : (
>> http://www.postgresql.org/docs/9.5/static/textsearch-controls.html#TEXTSEARCH-RANKING
>> )
>> "The built-in ranking functions are only examples. You can write your own
>> ranking functions and/or combine their results with additional factors to
>> fit your specific needs."
>>
>> The build-in seems not enough for my use case. How to write my own
>> ranking functions ?
>>
>> I would like to create something like ts_rank_cd( tsv, 'foo & bar',
>> my_new_normalization_integer)
>>
>>
> you can look on src/backend/utils/adt/tsrank.c and write your own
> function. google can help
> https://www.google.ru/search?q=how+to+write+c+function+postgresql
>
>
>> ----
>> pg 9.5
>>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2016-05-03 14:23:19 Re: Field size become unlimited in union...
Previous Message uğur Karabin 2016-05-03 13:57:03 Re: Vacuum full of parent without partitions possible?