diff options
| author | Andrew Dunstan | 2017-03-31 18:26:03 +0000 |
|---|---|---|
| committer | Andrew Dunstan | 2017-03-31 18:26:03 +0000 |
| commit | e306df7f9cd6b4433273e006df11bdc966b7079e (patch) | |
| tree | 9afb3d3ca47524d12b936c2fdfa37427eeaf62ea /src/include/tsearch | |
| parent | c80b9920fcbcbf75e3d7e8fe092bf6e15d9d40b8 (diff) | |
Full Text Search support for json and jsonb
The new functions are ts_headline() and to_tsvector.
Dmitry Dolgov, edited and documented by me.
Diffstat (limited to 'src/include/tsearch')
| -rw-r--r-- | src/include/tsearch/ts_type.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h index 155650c6f36..873e2e18565 100644 --- a/src/include/tsearch/ts_type.h +++ b/src/include/tsearch/ts_type.h @@ -86,6 +86,15 @@ typedef struct #define MAXNUMPOS (256) #define LIMITPOS(x) ( ( (x) >= MAXENTRYPOS ) ? (MAXENTRYPOS-1) : (x) ) +/* + * In case if a TSVector contains several parts and we want to treat them as + * separate, it's necessary to add an artificial increment to position of each + * lexeme from every next part. It's required to avoid the situation when + * tsquery can find a phrase consisting of lexemes from two of such parts. + * TS_JUMP defined a value of this increment. + */ +#define TS_JUMP 1 + /* This struct represents a complete tsvector datum */ typedef struct { |
