mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 17:31:16 +02:00
Improve comments for TSLexeme data structure.
Mostly, clean up long-ago pgindent damage.
This commit is contained in:
parent
515e813543
commit
a0d2f05a0d
@ -85,20 +85,31 @@ extern bool searchstoplist(StopList *s, char *key);
|
|||||||
/* return struct for any lexize function */
|
/* return struct for any lexize function */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/*
|
/*----------
|
||||||
* number of variant of split word , for example Word 'fotballklubber'
|
* Number of current variant of split word. For example the Norwegian
|
||||||
* (norwegian) has two varian to split: ( fotball, klubb ) and ( fot,
|
* word 'fotballklubber' has two variants to split: ( fotball, klubb )
|
||||||
* ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball
|
* and ( fot, ball, klubb ). So, dictionary should return:
|
||||||
* 1 klubb 2 fot 2 ball 2 klubb
|
*
|
||||||
|
* 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 nvariant;
|
||||||
|
|
||||||
uint16 flags;
|
uint16 flags; /* See flag bits below */
|
||||||
|
|
||||||
/* C-string */
|
char *lexeme; /* C string */
|
||||||
char *lexeme;
|
|
||||||
} TSLexeme;
|
} TSLexeme;
|
||||||
|
|
||||||
|
/* Flag bits that can appear in TSLexeme.flags */
|
||||||
#define TSL_ADDPOS 0x01
|
#define TSL_ADDPOS 0x01
|
||||||
#define TSL_PREFIX 0x02
|
#define TSL_PREFIX 0x02
|
||||||
#define TSL_FILTER 0x04
|
#define TSL_FILTER 0x04
|
||||||
|
Loading…
Reference in New Issue
Block a user