forked from slusarz/dovecot-fts-flatcurve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7f6458
commit 56d1f92
Showing
8 changed files
with
569 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
.github/actions/dovecot-fts-flatcurve-test/configs/dovecot.conf.issue-38-flatcurve
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
!include /dovecot/configs/dovecot.conf | ||
|
||
plugin { | ||
fts_decoder = decode2text | ||
} | ||
|
||
service decode2text { | ||
executable = script /usr/local/libexec/dovecot/decode2text.sh | ||
unix_listener decode2text { | ||
mode = 0666 | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
.github/actions/dovecot-fts-flatcurve-test/configs/dovecot.conf.issue-38-lucene
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
!include /dovecot/configs/dovecot.conf | ||
|
||
mail_plugins = $mail_plugins fts fts_lucene | ||
|
||
plugin { | ||
fts = lucene | ||
fts_lucene = whitespace_chars=@. | ||
} | ||
|
||
plugin { | ||
fts_decoder = decode2text | ||
} | ||
|
||
service decode2text { | ||
executable = script /usr/local/libexec/dovecot/decode2text.sh | ||
unix_listener decode2text { | ||
mode = 0666 | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
.github/actions/dovecot-fts-flatcurve-test/configs/dovecot.conf.issue-38-squat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
!include /dovecot/configs/dovecot.conf | ||
|
||
mail_plugins = $mail_plugins fts fts_squat | ||
|
||
plugin { | ||
fts = squat | ||
fts_squat = partial=4 full=10 | ||
} | ||
|
||
plugin { | ||
fts_decoder = decode2text | ||
} | ||
|
||
service decode2text { | ||
executable = script /usr/local/libexec/dovecot/decode2text.sh | ||
unix_listener decode2text { | ||
mode = 0666 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
446 changes: 446 additions & 0 deletions
446
.github/actions/dovecot-fts-flatcurve-test/imaptest/issue-38/default.mbox
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
.github/actions/dovecot-fts-flatcurve-test/imaptest/issue-38/issue-38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
messages: all | ||
|
||
ok search body bodybody | ||
* search 1 | ||
ok search body attachment | ||
* search 1 | ||
ok search or body bodybody header reply-to bodybody | ||
* search 1 | ||
ok search or body attachment header reply-to attachment | ||
* search 1 |
45 changes: 45 additions & 0 deletions
45
.github/actions/dovecot-fts-flatcurve-test/patches/fts-squat.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
diff --git a/src/plugins/fts-squat/fts-backend-squat.c b/src/plugins/fts-squat/fts-backend-squat.c | ||
index fbd7bbe156..ff6d429f61 100644 | ||
--- a/src/plugins/fts-squat/fts-backend-squat.c | ||
+++ b/src/plugins/fts-squat/fts-backend-squat.c | ||
@@ -21,7 +21,7 @@ struct squat_fts_backend { | ||
struct squat_trie *trie; | ||
|
||
unsigned int partial_len, full_len; | ||
- bool refresh; | ||
+ /* bool refresh; */ | ||
}; | ||
|
||
struct squat_fts_backend_update_context { | ||
@@ -105,8 +105,9 @@ fts_backend_squat_set_box(struct squat_fts_backend *backend, | ||
struct mailbox_status status; | ||
const char *path; | ||
enum squat_index_flags flags = 0; | ||
- int ret; | ||
+ /* int ret; */ | ||
|
||
+ /* | ||
if (backend->box == box) | ||
{ | ||
if (backend->refresh) { | ||
@@ -117,8 +118,9 @@ fts_backend_squat_set_box(struct squat_fts_backend *backend, | ||
} | ||
return 0; | ||
} | ||
+ */ | ||
fts_backend_squat_unset_box(backend); | ||
- backend->refresh = FALSE; | ||
+ /* backend->refresh = FALSE; */ | ||
if (box == NULL) | ||
return 0; | ||
|
||
@@ -343,7 +345,8 @@ static int fts_backend_squat_refresh(struct fts_backend *_backend) | ||
struct squat_fts_backend *backend = | ||
(struct squat_fts_backend *)_backend; | ||
|
||
- backend->refresh = TRUE; | ||
+ /* backend->refresh = TRUE; */ | ||
+ fts_backend_squat_unset_box(backend); | ||
return 0; | ||
} | ||
|