aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-11-03 18:47:28 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-11-03 18:47:28 -0400
commita0d2f05a0d433ab68ec378744ff920562a5ef681 (patch)
treecc0337e6d6adc7ed77af6ac3708379913e317f8a /src
parent515e813543dad5464c1a226fd068fd4daf26a7f9 (diff)
downloadpostgresql-a0d2f05a0d433ab68ec378744ff920562a5ef681.tar.gz
postgresql-a0d2f05a0d433ab68ec378744ff920562a5ef681.zip
Improve comments for TSLexeme data structure.
Mostly, clean up long-ago pgindent damage.
Diffstat (limited to 'src')
-rw-r--r--src/include/tsearch/ts_public.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/include/tsearch/ts_public.h b/src/include/tsearch/ts_public.h
index 437f4369e2d..4db4f9f8515 100644
--- a/src/include/tsearch/ts_public.h
+++ b/src/include/tsearch/ts_public.h
@@ -85,20 +85,31 @@ extern bool searchstoplist(StopList *s, char *key);
/* return struct for any lexize function */
typedef struct
{
- /*
- * number of variant of split word , for example Word 'fotballklubber'
- * (norwegian) has two varian to split: ( fotball, klubb ) and ( fot,
- * ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball
- * 1 klubb 2 fot 2 ball 2 klubb
+ /*----------
+ * Number of current variant of split word. For example the Norwegian
+ * word 'fotballklubber' has two variants to split: ( fotball, klubb )
+ * and ( fot, ball, klubb ). So, dictionary should return:
+ *
+ * nvariant lexeme
+ * 1 fotball
+ * 1 klubb
+ * 2 fot
+ * 2 ball
+ * 2 klubb
+ *
+ * In general, a TSLexeme will be considered to belong to the same split
+ * variant as the previous one if they have the same nvariant value.
+ * The exact values don't matter, only changes from one lexeme to next.
+ *----------
*/
uint16 nvariant;
- uint16 flags;
+ uint16 flags; /* See flag bits below */
- /* C-string */
- char *lexeme;
+ char *lexeme; /* C string */
} TSLexeme;
+/* Flag bits that can appear in TSLexeme.flags */
#define TSL_ADDPOS 0x01
#define TSL_PREFIX 0x02
#define TSL_FILTER 0x04