diff --git a/include/ircd/m/dbs.h b/include/ircd/m/dbs.h index bc83f2717..35e8d7439 100644 --- a/include/ircd/m/dbs.h +++ b/include/ircd/m/dbs.h @@ -69,6 +69,7 @@ struct ircd::m::dbs::write_opts db::op op {db::op::SET}; bool present {true}; bool history {true}; + bool indexer {true}; }; /// Database Schema Descriptors diff --git a/ircd/m/dbs.cc b/ircd/m/dbs.cc index c94350dcd..0f22d2ea3 100644 --- a/ircd/m/dbs.cc +++ b/ircd/m/dbs.cc @@ -115,11 +115,11 @@ ircd::m::dbs::write(db::txn &txn, "Cannot write to database: no index specified for event." }; - db::txn::append + if(opts.indexer) db::txn::append { txn, dbs::event_idx, { - db::op::SET, + opts.op, at<"event_id"_>(event), byte_view(opts.idx) }