[Pgbigm-hackers] Adding similarity() and similarity_op(), '%' to pg_bigm

アーカイブの一覧に戻る

Fujii Masao masao****@gmail*****
2013年 10月 4日 (金) 11:25:21 JST


On Fri, Oct 4, 2013 at 9:26 AM, Amit Langote <amitl****@gmail*****> wrote:
> On Fri, Oct 4, 2013 at 3:44 AM, Fujii Masao <masao****@gmail*****> wrote:
>> On Sat, Sep 28, 2013 at 6:16 PM, Beena Emerson <memis****@gmail*****> wrote:
>>> Please find attached the updated patch to rebase against the new HEAD and
>>> also implements the comments I had given before.
>>
>> +PG_FUNCTION_INFO_V1(set_bigm_limit);
>> +Datum        set_bigm_limit(PG_FUNCTION_ARGS);
>> +
>> +PG_FUNCTION_INFO_V1(show_bigm_limit);
>> +Datum        show_bigm_limit(PG_FUNCTION_ARGS);
>>
>> I think that it's better to treat the similarity limit as a custom GUC variable
>> rather than implementing special functions like the above. If we do that,
>> we can change and show the value of the similarity limit as follows. Thought?
>>
>>     SET pg_bigm.similarity_limit TO 0.001;
>>     SHOW pg_bigm.similarity_limit;
>>
>
> I think it looks better.
>
>> +/* GIN does not support ordering operators, wait for GiST support...
>> +
>> +CREATE FUNCTION bigm_similarity_dist(text,text)
>> +RETURNS float4
>> +AS 'MODULE_PATHNAME'
>> +LANGUAGE C STRICT IMMUTABLE;
>>
>> So we should not include bigm_similarity_dist() at all?
>>
>
> It could be added I think. I guess I forgot to remove the comment
> around the function itself. So,

Is it really worth adding that even if pg_bigm supports only GIN index?

The pg_trgm document says

----------
    SELECT t, t <-> 'word' AS dist
     FROM test_trgm
     ORDER BY dist LIMIT 10;

    This can be implemented quite efficiently by GiST indexes, but not
by GIN indexes.
----------

Is this related to the comment that you added into the patch?

Regards,

-- 
Fujii Masao




Pgbigm-hackers メーリングリストの案内
アーカイブの一覧に戻る