Lucene.Net 布隆过滤器的按位查询
Lucene.Net bitwise query on bloom-filter
如果在 lucene 中我有一个包含字段 "bloom" 的文档,它是一个字节数组 [0 1 0 1 1 1 1] 有没有办法通过按位操作对该文档执行查询,例如, andquery(value:[1 1 1 1 1 1 1], matching:[1 1 1 1 1 1 1]) orquery, notquery etc on the fields.
其基本目标是高效编码大量哈希(布隆过滤器)并对其进行查询。我试图避免创建 100 多个必须在查询中匹配的 bool 字段。
您可以尝试将过滤器 [0 1 0 1 1 1 1] 编码为字符串“0101111”并使用 wildcard queries for searching for several hashes '0?0???1'. Also, I think in your use case will be useful a fuzzy searching,基于 Levenshtein 距离,它将考虑不同元素的数量在字符串中。
如果在 lucene 中我有一个包含字段 "bloom" 的文档,它是一个字节数组 [0 1 0 1 1 1 1] 有没有办法通过按位操作对该文档执行查询,例如, andquery(value:[1 1 1 1 1 1 1], matching:[1 1 1 1 1 1 1]) orquery, notquery etc on the fields.
其基本目标是高效编码大量哈希(布隆过滤器)并对其进行查询。我试图避免创建 100 多个必须在查询中匹配的 bool 字段。
您可以尝试将过滤器 [0 1 0 1 1 1 1] 编码为字符串“0101111”并使用 wildcard queries for searching for several hashes '0?0???1'. Also, I think in your use case will be useful a fuzzy searching,基于 Levenshtein 距离,它将考虑不同元素的数量在字符串中。