[
https://issues.apache.org/jira/browse/OAK-10674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17823917#comment-17823917
]
Thomas Mueller edited comment on OAK-10674 at 3/6/24 8:58 AM:
--------------------------------------------------------------
I can add the method "expectedFpp()" in our code as well
(getEstimatedEntryCount we already have), with documentation that this is O ( n
). The implementation is pretty simple: see the Guava implementation here:
https://github.com/google/guava/blob/master/guava/src/com/google/common/hash/BloomFilter.java#L190C17-L190C30
Actually I would suggest this method:
{noformat}
/**
* Get the expected false positive rate for the current entries in the
filter.
* This will first calculate the estimated entry count, and then calculate
the false positive probability from there.
...
*/
public double expectedFpp() {
return calculateFpp(getEstimatedEntryCount(), getBitCount(), getK());
}
{noformat}
was (Author: tmueller):
I can add the methods "expectedFpp()" and "approximateElementCount()" in our
code as well, with documentation that this is O ( n ). The implementation is
pretty simple: see the Guava implementation here:
https://github.com/google/guava/blob/master/guava/src/com/google/common/hash/BloomFilter.java#L190C17-L190C30
> DocumentStore: verify that we could use Oak's Bloom filter
> ----------------------------------------------------------
>
> Key: OAK-10674
> URL: https://issues.apache.org/jira/browse/OAK-10674
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: documentmk
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Priority: Major
>
> Test that we can use
> oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/analysis/utils/BloomFilter.java
> (for now, by copying it over).
> Then decide about where to move it, and whether API changes are desired.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)