Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4ca765f9
Commit
4ca765f9
authored
Nov 25, 2003
by
Teodor Sigaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore too long lexeme
parent
cf87eb47
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
contrib/tsearch2/ts_cfg.c
contrib/tsearch2/ts_cfg.c
+20
-2
No files found.
contrib/tsearch2/ts_cfg.c
View file @
4ca765f9
...
...
@@ -21,6 +21,8 @@
#include "common.h"
#include "tsvector.h"
#define IGNORE_LONGLEXEME 1
/*********top interface**********/
static
void
*
plan_getcfg_bylocale
=
NULL
;
...
...
@@ -288,10 +290,18 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
PointerGetDatum
(
&
lenlemm
))))
!=
0
)
{
if
(
lenlemm
>=
MAXSTRLEN
)
if
(
lenlemm
>=
MAXSTRLEN
)
{
#ifdef IGNORE_LONGLEXEME
ereport
(
NOTICE
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"word is too long"
)));
continue
;
#else
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"word is too long"
)));
#endif
}
if
(
type
>=
cfg
->
len
)
/* skip this type of lexem */
continue
;
...
...
@@ -414,10 +424,18 @@ hlparsetext(TSCfgInfo * cfg, HLPRSTEXT * prs, QUERYTYPE * query, char *buf, int4
PointerGetDatum
(
&
lenlemm
))))
!=
0
)
{
if
(
lenlemm
>=
MAXSTRLEN
)
if
(
lenlemm
>=
MAXSTRLEN
)
{
#ifdef IGNORE_LONGLEXEME
ereport
(
NOTICE
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"word is too long"
)));
continue
;
#else
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
errmsg
(
"word is too long"
)));
#endif
}
hladdword
(
prs
,
lemm
,
lenlemm
,
type
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment