diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-02-06 11:33:58 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-02-06 11:34:28 +0200 |
commit | e8f9fe4ae7ab2784ca42b264f4656249311ddfe4 (patch) | |
tree | 4a9ed5ef4298105f712611f9c9c401b843185c45 /src/backend/utils/adt/tsrank.c | |
parent | b87e1680b98465b002198ae49a4f4f2bce4d129e (diff) |
Fix typos in comments.
Backpatch to all supported versions, where applicable, to make backpatching
of future fixes go more smoothly.
Josh Soref
Discussion: https://www.postgresql.org/message-id/CACZqfqCf+5qRztLPgmmosr-B0Ye4srWzzw_mo4c_8_B_mtjmJQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/tsrank.c')
-rw-r--r-- | src/backend/utils/adt/tsrank.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index 1dbe47ef917..0e6fcd9083f 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -777,7 +777,7 @@ calc_rank_cd(float4 *arrdata, TSVector txt, TSQuery query, int method) /* * if doc are big enough then ext.q may be equal to ext.p due to limit - * of posional information. In this case we approximate number of + * of positional information. In this case we approximate number of * noise word as half cover's length */ nNoise = (ext.q - ext.p) - (ext.end - ext.begin); @@ -786,7 +786,7 @@ calc_rank_cd(float4 *arrdata, TSVector txt, TSQuery query, int method) Wdoc += Cpos / ((double) (1 + nNoise)); CurExtPos = ((double) (ext.q + ext.p)) / 2.0; - if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent devision by + if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent division by * zero in a case of multiple lexize */ ) SumDist += 1.0 / (CurExtPos - PrevExtPos); |