Class Murmur3HashFunction

java.lang.Object
org.hibernate.search.util.common.data.impl.Murmur3HashFunction
All Implemented Interfaces:
HashFunction, RangeCompatibleHashFunction

public final class Murmur3HashFunction extends Object implements RangeCompatibleHashFunction
A fast, but cryptographically insecure hash function, implementing Murmur3.

See MurmurHash3_x86_32 in the C++ implementation.

This function is more complex than SimpleHashFunction, but is suitable for use in RangeHashTable, because it produces a more uniform hash distribution, even for datasets with very similar strings (same length, small character set, ...).

MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims copyright to this source code.

Original source code: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp (Modified to adapt to Guava coding conventions and to use Guava's HashFunction interface, then modified again to adapt to Hibernate Search's coding conventions and to remove code that is unnecessary in Hibernate Search).

Author:
Austin Appleby, Dimitris Andreou, Kurt Alfred Kluever