diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-12-12 02:17:17 +0100 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-23 10:41:44 -0500 |
commit | 4786302fb99f930afca1e778255b72c6999ca480 (patch) | |
tree | 8c92a473f0c8772d152561d909fedce4b8ed5d2f /src/leveldb/doc/index.html | |
parent | c429f2b062140843f42b78d70278279c6be74441 (diff) |
Replace leveldb/ with vanilla 1.7.0
Diffstat (limited to 'src/leveldb/doc/index.html')
-rw-r--r-- | src/leveldb/doc/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leveldb/doc/index.html b/src/leveldb/doc/index.html index 521d2baf41..3ed0ed9d9e 100644 --- a/src/leveldb/doc/index.html +++ b/src/leveldb/doc/index.html @@ -408,7 +408,7 @@ The optional <code>FilterPolicy</code> mechanism can be used to reduce the number of disk reads substantially. <pre> leveldb::Options options; - options.filter_policy = NewBloomFilter(10); + options.filter_policy = NewBloomFilterPolicy(10); leveldb::DB* db; leveldb::DB::Open(options, "/tmp/testdb", &db); ... use the database ... @@ -420,7 +420,7 @@ The preceding code associates a based filtering policy with the database. Bloom filter based filtering relies on keeping some number of bits of data in memory per key (in this case 10 bits per key since that is the argument we passed -to NewBloomFilter). This filter will reduce the number of unnecessary +to NewBloomFilterPolicy). This filter will reduce the number of unnecessary disk reads needed for <code>Get()</code> calls by a factor of approximately a 100. Increasing the bits per key will lead to a larger reduction at the cost of more memory usage. We recommend that @@ -430,7 +430,7 @@ lot of random reads set a filter policy. If you are using a custom comparator, you should ensure that the filter policy you are using is compatible with your comparator. For example, consider a comparator that ignores trailing spaces when comparing keys. -<code>NewBloomFilter</code> must not be used with such a comparator. +<code>NewBloomFilterPolicy</code> must not be used with such a comparator. Instead, the application should provide a custom filter policy that also ignores trailing spaces. For example: <pre> @@ -438,7 +438,7 @@ also ignores trailing spaces. For example: private: FilterPolicy* builtin_policy_; public: - CustomFilterPolicy() : builtin_policy_(NewBloomFilter(10)) { } + CustomFilterPolicy() : builtin_policy_(NewBloomFilterPolicy(10)) { } ~CustomFilterPolicy() { delete builtin_policy_; } const char* Name() const { return "IgnoreTrailingSpacesFilter"; } |