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

Commit0de96f8

Browse files
committed
Update fti README and stopwords.
1 parent39282da commit0de96f8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎contrib/fulltextindex/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ the fti-table and the orig-table, we can get the actual rows we want
2727
(this can also be done by using subselects, and maybe there're other
2828
ways too).
2929

30+
The trigger code also allows an array called StopWords, that prevents
31+
certain words from being indexed.
32+
3033
As an example we take the previous query, where we assume we have all
3134
sub-strings in the table 'cds-fti':
3235

‎contrib/fulltextindex/fti.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ bool new_tuple = false;
7070

7171
/* THIS LIST MUST BE IN SORTED ORDER, A BINARY SEARCH IS USED!!!! */
7272
char*StopWords[]= {/* list of words to skip in indexing */
73+
#ifdefSAMPLE_STOP_WORDS
7374
"no"
7475
"the",
7576
"yes",
77+
#endif
7678
};
7779

7880
/* stuff for caching query-plans, stolen from contrib/spi/\*.c */
@@ -331,6 +333,9 @@ is_stopword(char *text)
331333
StopLow=&StopWords[0];/* initialize stuff for binary search */
332334
StopHigh=endof(StopWords);
333335

336+
if (lengthof(StopWords)==0)
337+
return false;
338+
334339
while (StopLow <=StopHigh)
335340
{
336341
StopMiddle=StopLow+ (StopHigh-StopLow) /2;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp