* STRING is the name of a file within that
* directory for this mail message.
*
+ * property: Has a property with key=value
+ * FIXME: if no = is present, should match on any value
+ *
* A mail document also has four values:
*
* TIMESTAMP: The time_t value corresponding to the message's
{ "directory", "XDIRECTORY" },
{ "file-direntry", "XFDIRENTRY" },
{ "directory-direntry", "XDDIRENTRY" },
- { "property", "XPROPERTY" },
};
static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
{ "is", "K" },
{ "id", "Q" },
{ "path", "P" },
+ { "property", "XPROPERTY" },
/*
* Unconditionally add ':' to reduce potential ambiguity with
* overlapping prefixes and/or terms that start with capital
return status;
}
-#if HAVE_XAPIAN_COMPACT
static int
unlink_cb (const char *path,
unused (const struct stat *sb),
return ret;
}
-#else
-notmuch_status_t
-notmuch_database_compact (unused (const char *path),
- unused (const char *backup_path),
- unused (notmuch_compact_status_cb_t status_cb),
- unused (void *closure))
-{
- _notmuch_database_log (notmuch, "notmuch was compiled against a xapian version lacking compaction support.\n");
- return NOTMUCH_STATUS_UNSUPPORTED_OPERATION;
-}
-#endif
notmuch_status_t
notmuch_database_destroy (notmuch_database_t *notmuch)
notmuch->atomic_nesting > 0)
goto DONE;
- if (notmuch_database_needs_upgrade(notmuch))
- return NOTMUCH_STATUS_UPGRADE_REQUIRED;
+ if (notmuch_database_needs_upgrade (notmuch))
+ return NOTMUCH_STATUS_UPGRADE_REQUIRED;
try {
(static_cast <Xapian::WritableDatabase *> (notmuch->xapian_db))->begin_transaction (false);
* However, we rely on flushing to test atomicity. */
const char *thresh = getenv ("XAPIAN_FLUSH_THRESHOLD");
if (thresh && atoi (thresh) == 1)
- db->flush ();
+ db->commit ();
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch, "A Xapian exception occurred committing transaction: %s.\n",
error.get_msg().c_str());