From 9c06fab60fb50b73c37d90a4ad900729f401b401 Mon Sep 17 00:00:00 2001 From: Lucjan Suski Date: Tue, 29 Oct 2019 15:20:35 +0100 Subject: [PATCH] Allow setting optimize_filter_for_hits --- src/db_options.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/db_options.rs b/src/db_options.rs index c056e3c..29d0131 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -414,6 +414,12 @@ impl Options { } } + pub fn set_optimize_filters_for_hits(&mut self, optimize_for_hits: bool) { + unsafe { + ffi::rocksdb_options_set_optimize_filters_for_hits(self.inner, optimize_for_hits as c_uchar); + } + } + /// Sets the number of open files that can be used by the DB. You may need to /// increase this if your database has a large working set. Value `-1` means /// files opened are always kept open. You can estimate number of files based