Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit72a3582

Browse files
committed
Add description of tsvector type layout
1 parent3a214ab commit72a3582

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎contrib/tsearch2/tsvector.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ typedef uint16 WordEntryPos;
4747
#defineMAXNUMPOS256
4848
#defineLIMITPOS(x) ( ( (x) >= MAXENTRYPOS ) ? (MAXENTRYPOS-1) : (x) )
4949

50+
/*
51+
* Structure of tsvector datatype:
52+
* 1) int4 len - varlena's length
53+
* 2) int4size - number of lexemes or WordEntry array, which is the same
54+
* 3) Array of WordEntry - sorted array, comparison based on word's length
55+
*and strncmp(). WordEntry->pos points number of
56+
*bytes from end of WordEntry array to start of
57+
*corresponding lexeme.
58+
* 4) Lexeme's storage:
59+
* SHORTALIGNED(lexeme) and position information if it exists
60+
* Position information: first int2 - is a number of positions and it
61+
* follows array of WordEntryPos
62+
*/
63+
5064
typedefstruct
5165
{
5266
int4len;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp