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
0de96f82
Commit
0de96f82
authored
Jul 20, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fti README and stopwords.
parent
39282daa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
contrib/fulltextindex/README
contrib/fulltextindex/README
+3
-0
contrib/fulltextindex/fti.c
contrib/fulltextindex/fti.c
+5
-0
No files found.
contrib/fulltextindex/README
View file @
0de96f82
...
...
@@ -27,6 +27,9 @@ the fti-table and the orig-table, we can get the actual rows we want
(this can also be done by using subselects, and maybe there're other
ways too).
The trigger code also allows an array called StopWords, that prevents
certain words from being indexed.
As an example we take the previous query, where we assume we have all
sub-strings in the table 'cds-fti':
...
...
contrib/fulltextindex/fti.c
View file @
0de96f82
...
...
@@ -70,9 +70,11 @@ bool new_tuple = false;
/* THIS LIST MUST BE IN SORTED ORDER, A BINARY SEARCH IS USED!!!! */
char
*
StopWords
[]
=
{
/* list of words to skip in indexing */
#ifdef SAMPLE_STOP_WORDS
"no"
"the"
,
"yes"
,
#endif
};
/* stuff for caching query-plans, stolen from contrib/spi/\*.c */
...
...
@@ -331,6 +333,9 @@ is_stopword(char *text)
StopLow
=
&
StopWords
[
0
];
/* initialize stuff for binary search */
StopHigh
=
endof
(
StopWords
);
if
(
lengthof
(
StopWords
)
==
0
)
return
false
;
while
(
StopLow
<=
StopHigh
)
{
StopMiddle
=
StopLow
+
(
StopHigh
-
StopLow
)
/
2
;
...
...
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