From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | gin_fuzzy_search_limit description |
Date: | 2006-11-29 15:47:38 |
Message-ID: | 20061129154738.GI3288@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I'm not very clear on what this is supposed to mean. The description in
guc.c is this:
Sets the maximum allowed result for exact search by GIN.
Say again?
The involved code is this:
if (GinFuzzySearchLimit > 0)
{
/*
* If all of keys more than treshold we will try to reduce result,
* we hope (and only hope, for intersection operation of array our
* supposition isn't true), that total result will not more than
* minimal predictNumberResult.
*/
for (i = 0; i < key->nentries; i++)
if (key->scanEntry[i].predictNumberResult <= key->nentries * GinFuzzySearchLimit)
return;
for (i = 0; i < key->nentries; i++)
if (key->scanEntry[i].predictNumberResult > key->nentries * GinFuzzySearchLimit)
{
key->scanEntry[i].predictNumberResult /= key->nentries;
key->scanEntry[i].reduceResult = TRUE;
}
}
(ginget.c, startScanKey)
The source comment is not very clear either :-) And I'm not sure I
follow what the code is doing.
Can anyone clarify?
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2006-11-29 15:56:13 | Re: small patch with czech translations for names of months and days |
Previous Message | Tom Lane | 2006-11-29 15:46:16 | Re: "Compacting" a relation |