diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-01-22 12:29:07 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-01-22 12:29:22 -0500 |
commit | 042a3e2353e366cc1e571078fd92c7365fe12d46 (patch) | |
tree | fe9fd66e3a860e51d41333a8a8a2a35fcb3f231b | |
parent | 47acf3add32eb59fc3717ffbe21fd872b037a8f2 (diff) | |
download | postgresql-042a3e2353e366cc1e571078fd92c7365fe12d46.tar.gz postgresql-042a3e2353e366cc1e571078fd92c7365fe12d46.zip |
Improve levenshtein() docs.
Fix chars-vs-bytes confusion here too. Improve poor grammar and
markup.
-rw-r--r-- | doc/src/sgml/fuzzystrmatch.sgml | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/src/sgml/fuzzystrmatch.sgml b/doc/src/sgml/fuzzystrmatch.sgml index f26bd90dfc5..feb06861da3 100644 --- a/doc/src/sgml/fuzzystrmatch.sgml +++ b/doc/src/sgml/fuzzystrmatch.sgml @@ -106,15 +106,20 @@ levenshtein_less_equal(text source, text target, int max_d) returns int <para> Both <literal>source</literal> and <literal>target</literal> can be any - non-null string, with a maximum of 255 bytes. The cost parameters + non-null string, with a maximum of 255 characters. The cost parameters specify how much to charge for a character insertion, deletion, or substitution, respectively. You can omit the cost parameters, as in the second version of the function; in that case they all default to 1. - <literal>levenshtein_less_equal</literal> is accelerated version of - levenshtein function for low values of distance. If actual distance - is less or equal then max_d, then <literal>levenshtein_less_equal</literal> - returns accurate value of it. Otherwise this function returns value - which is greater than max_d. + </para> + + <para> + <function>levenshtein_less_equal</function> is an accelerated version of the + Levenshtein function for use when only small distances are of interest. + If the actual distance is less than or equal to <literal>max_d</>, + then <function>levenshtein_less_equal</function> returns the correct + distance; otherwise it returns some value greater than <literal>max_d</>. + If <literal>max_d</> is negative then the behavior is the same as + <function>levenshtein</function>. </para> <para> |