@@ -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' : {
0 commit comments