A method for constructing an index suitable for indexing a large set of
records identified by long generally randomly distributed record names
and for answering membership queries about the set, the method comprising
assigning each different record a different record name, determining that
a new record name is not already represented in the index by checking an
entry in a first level index that is shorter than the complete new record
name, and determining that a queried record name is already represented
in the index by determining that the queried record name is represented
in a second level index that contains enough information to reconstruct
the complete queried record name.