Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

gin_fuzzy_search_limit description



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group