diff options
| author | Teodor Sigaev | 2016-06-27 17:47:32 +0000 |
|---|---|---|
| committer | Teodor Sigaev | 2016-06-27 17:47:32 +0000 |
| commit | 3dbbd0f02a257d8d5c4cba14726371505f2e7266 (patch) | |
| tree | 70a9fec2e68e357c361cb92f91367651b46f6bde /src/backend/utils/adt/tsrank.c | |
| parent | 028350f619f7688e0453fcd2c4b25abe9ba30fa7 (diff) | |
Do not fallback to AND for FTS phrase operator.
If there is no positional information of lexemes then phrase operator will not
fallback to AND operator. This change makes needing to modify TS_execute()
interface, because somewhere (in indexes, for example) positional information
is unaccesible and in this cases we need to force fallback to AND.
Per discussion [email protected]
Diffstat (limited to 'src/backend/utils/adt/tsrank.c')
| -rw-r--r-- | src/backend/utils/adt/tsrank.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index 32023821b3f..d887a14d057 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -662,7 +662,8 @@ Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, CoverExt *ext) { fillQueryRepresentationData(qr, ptr); - if (TS_execute(GETQUERY(qr->query), (void *) qr, false, checkcondition_QueryOperand)) + if (TS_execute(GETQUERY(qr->query), (void *) qr, + TS_EXEC_EMPTY, checkcondition_QueryOperand)) { if (WEP_GETPOS(ptr->pos) > ext->q) { @@ -691,7 +692,8 @@ Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, CoverExt *ext) */ fillQueryRepresentationData(qr, ptr); - if (TS_execute(GETQUERY(qr->query), (void *) qr, true, checkcondition_QueryOperand)) + if (TS_execute(GETQUERY(qr->query), (void *) qr, + TS_EXEC_CALC_NOT, checkcondition_QueryOperand)) { if (WEP_GETPOS(ptr->pos) < ext->p) { |
