Skip to content

Commit d0a35f0

Browse files
slusarzsirainen
authored andcommitted
doveadm: Add flatcurve doveadm commands
1 parent 93de531 commit d0a35f0

File tree

2 files changed

+224
-0
lines changed

2 files changed

+224
-0
lines changed

data/doveadm.js

+141
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,147 @@ the source user name, e.g., \`user sourceuser\`.`
11281128
text: `Search mail with FTS plugin.`,
11291129
},
11301130

1131+
/* flatcurve FTS commands */
1132+
1133+
'fts flatcurve check': {
1134+
args: {
1135+
'mailbox-mask': {
1136+
example: [ 'INBOX' ],
1137+
positional: true,
1138+
type: doveadm_arg_types.ARRAY,
1139+
text: `A list of mailbox masks to check.`,
1140+
},
1141+
},
1142+
man: 'doveadm-fts',
1143+
plugin: 'fts-flatcurve',
1144+
flags: doveadm_flag_types.USER | doveadm_flag_types.USERFILE,
1145+
text: `
1146+
Run a simple check on Dovecot Xapian databases, and attempt to fix basic
1147+
errors (it is the same checking done by the xapian-check command with the
1148+
\`-F\` command-line option).`,
1149+
response: {
1150+
example: [
1151+
{
1152+
mailbox: "INBOX",
1153+
guid: "guid_string",
1154+
errors: 0,
1155+
shards: 1
1156+
}
1157+
],
1158+
text: `
1159+
For each mailbox that has FTS data, it outputs the following key/value fields:
1160+
1161+
| Key | Value |
1162+
| --- | ----- |
1163+
| mailbox | The human-readable mailbox name. (key is hidden) |
1164+
| guid | The GUID of the mailbox. |
1165+
| errors | The number of errors reported by the Xapian library. |
1166+
| shards | The number of index shards processed. |
1167+
`
1168+
},
1169+
},
1170+
1171+
'fts flatcurve remove': {
1172+
args: {
1173+
'mailbox-mask': {
1174+
example: [ 'INBOX' ],
1175+
positional: true,
1176+
type: doveadm_arg_types.ARRAY,
1177+
text: `A list of mailbox masks to remove.`,
1178+
},
1179+
},
1180+
man: 'doveadm-fts',
1181+
plugin: 'fts-flatcurve',
1182+
flags: doveadm_flag_types.USER | doveadm_flag_types.USERFILE,
1183+
text: `Removes all FTS data for a mailbox.`,
1184+
response: {
1185+
example: [
1186+
{
1187+
mailbox: "INBOX",
1188+
guid: "guid_string"
1189+
}
1190+
],
1191+
text: `
1192+
For each mailbox removed, it outputs the following key/value fields:
1193+
1194+
| Key | Value |
1195+
| --- | ----- |
1196+
| mailbox | The human-readable mailbox name. (key is hidden) |
1197+
| guid | The GUID of the mailbox. |
1198+
`
1199+
},
1200+
},
1201+
1202+
'fts flatcurve rotate': {
1203+
args: {
1204+
'mailbox-mask': {
1205+
example: [ 'INBOX' ],
1206+
positional: true,
1207+
type: doveadm_arg_types.ARRAY,
1208+
text: `A list of mailbox masks to rotate.`,
1209+
},
1210+
},
1211+
man: 'doveadm-fts',
1212+
plugin: 'fts-flatcurve',
1213+
flags: doveadm_flag_types.USER | doveadm_flag_types.USERFILE,
1214+
text: `Triggers an FTS index rotation for a mailbox.`,
1215+
response: {
1216+
example: [
1217+
{
1218+
mailbox: "INBOX",
1219+
guid: "guid_string"
1220+
}
1221+
],
1222+
text: `
1223+
For each mailbox rotated, it outputs the following key/value fields:
1224+
1225+
| Key | Value |
1226+
| --- | ----- |
1227+
| mailbox | The human-readable mailbox name. (key is hidden) |
1228+
| guid | The GUID of the mailbox. |
1229+
`
1230+
},
1231+
},
1232+
1233+
'fts flatcurve stats': {
1234+
args: {
1235+
'mailbox-mask': {
1236+
example: [ 'INBOX' ],
1237+
positional: true,
1238+
type: doveadm_arg_types.ARRAY,
1239+
text: `A list of mailbox masks to process.`,
1240+
},
1241+
},
1242+
man: 'doveadm-fts',
1243+
plugin: 'fts-flatcurve',
1244+
flags: doveadm_flag_types.USER | doveadm_flag_types.USERFILE,
1245+
text: `Returns FTS data for a mailbox.`,
1246+
response: {
1247+
example: [
1248+
{
1249+
mailbox: "INBOX",
1250+
guid: "guid_string",
1251+
last_uid: 123,
1252+
messages: 2,
1253+
shards: 1,
1254+
version: 1
1255+
}
1256+
],
1257+
text: `
1258+
For each mailbox that has FTS data, it outputs the following key/value fields:
1259+
1260+
| Key | Value |
1261+
| --- | ----- |
1262+
| mailbox | The human-readable mailbox name. (key is hidden) |
1263+
| guid | The GUID of the mailbox. |
1264+
| last_uid | The last UID indexed in the mailbox. |
1265+
| messages | The number of messages indexed in the mailbox. |
1266+
| shards | The number of index shards. |
1267+
| version | The (Dovecot internal) version of the FTS data. |
1268+
`
1269+
},
1270+
},
1271+
11311272
'import': {
11321273
args: {
11331274
'source-user': {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
### fts flatcurve check
2+
3+
**doveadm** [*GLOBAL OPTIONS*] fts flatcurve check
4+
[**-u** *user* | **-A** | **-F** *file* | **\-\-no-userdb-lookup**]
5+
[**-S** *socket_path*]
6+
[*mailbox* ...]
7+
8+
Run a simple check on Dovecot Xapian databases, and attempt to fix basic
9+
errors (it is the same checking done by the xapian-check command with the
10+
`-F` command-line option).
11+
12+
*mailbox* is the list of mailboxes to process. It is possible to use
13+
wildcards (* and ?) in this value.
14+
15+
For each mailbox that has FTS data, it outputs the following key/value fields:
16+
17+
| Key | Value |
18+
| --- | ----- |
19+
| mailbox | The human-readable mailbox name. (key is hidden) |
20+
| guid | The GUID of the mailbox. |
21+
| errors | The number of errors reported by the Xapian library. |
22+
| shards | The number of index shards processed. |
23+
24+
### fts flatcurve remove
25+
26+
**doveadm** [*GLOBAL OPTIONS*] fts flatcurve remove
27+
[**-u** *user* | **-A** | **-F** *file* | **\-\-no-userdb-lookup**]
28+
[**-S** *socket_path*]
29+
[*mailbox* ...]
30+
31+
Removes all FTS data for a mailbox.
32+
33+
*mailbox* is the list of mailboxes to process. It is possible to use
34+
wildcards (* and ?) in this value.
35+
36+
For each mailbox removed, it outputs the following key/value fields:
37+
38+
| Key | Value |
39+
| --- | ----- |
40+
| mailbox | The human-readable mailbox name. (key is hidden) |
41+
| guid | The GUID of the mailbox. |
42+
43+
### fts flatcurve rotate
44+
45+
**doveadm** [*GLOBAL OPTIONS*] fts flatcurve rotate
46+
[**-u** *user* | **-A** | **-F** *file* | **\-\-no-userdb-lookup**]
47+
[**-S** *socket_path*]
48+
[*mailbox* ...]
49+
50+
Triggers an index rotation for a mailbox.
51+
52+
*mailbox* is the list of mailboxes to process. It is possible to use
53+
wildcards (* and ?) in this value.
54+
55+
For each mailbox rotated, it outputs the following key/value fields:
56+
57+
| Key | Value |
58+
| --- | ----- |
59+
| mailbox | The human-readable mailbox name. (key is hidden) |
60+
| guid | The GUID of the mailbox. |
61+
62+
### fts flatcurve stats
63+
64+
**doveadm** [*GLOBAL OPTIONS*] fts flatcurve stats
65+
[**-u** *user* | **-A** | **-F** *file* | **\-\-no-userdb-lookup**]
66+
[**-S** *socket_path*]
67+
[*mailbox* ...]
68+
69+
Returns FTS data for a mailbox.
70+
71+
*mailbox* is the list of mailboxes to process. It is possible to use
72+
wildcards (* and ?) in this value.
73+
74+
For each mailbox that has FTS data, it outputs the following key/value fields:
75+
76+
| Key | Value |
77+
| --- | ----- |
78+
| mailbox | The human-readable mailbox name. (key is hidden) |
79+
| guid | The GUID of the mailbox. |
80+
| last_uid | The last UID indexed in the mailbox. |
81+
| messages | The number of messages indexed in the mailbox. |
82+
| shards | The number of index shards. |
83+
| version | The (Dovecot internal) version of the FTS data. |

0 commit comments

Comments
 (0)