def __getitem__(self, hash_value):
<EOL>if hash_value not in self._index:<EOL><INDENT>if self._no_reindex:<EOL><INDENT>raise IndexError("<STR_LIT>" + str(hash_value))<EOL><DEDENT>self.__build_index(until=hash_value)<EOL><DEDENT>if hash_value not in self._index:<EOL><INDENT>fn = ("<STR_LIT>" + str(self._indexed_filename) + "<STR_LIT>"<EOL>if self._indexed_filename is not None else "<STR_LIT>")<EOL>raise IndexError("<STR_LIT>" + str(hash_value) +<EOL>"<STR_LIT>" + fn +<EOL>"<STR_LIT>")<EOL><DEDENT>orig_pos = self._indexed_file_handle.tell()<EOL>self._indexed_file_handle.seek(self._index[hash_value])<EOL>r_iter = self.record_iterator(self._indexed_file_handle)<EOL>try:<EOL><INDENT>return r_iter.next()<EOL><DEDENT>except StopIteration:<EOL><INDENT>fn = ("<STR_LIT>" + str(self._indexed_filename) + "<STR_LIT:)>"<EOL>if self._indexed_filename is None else "<STR_LIT>")<EOL>raise IndexError("<STR_LIT>" + fn +<EOL>"<STR_LIT>")<EOL><DEDENT>finally:<EOL><INDENT>self._indexed_file_handle.seek(orig_pos)<EOL><DEDENT>
retrieve the record from the file which hashed to the given value.

:return: the item in the indexed file that hashed to the given value.
:raise IndexError: