'Search tree for key that matches not only given key but also doc_id.'

def _find_key_to_update(self, key, doc_id):

    containing_leaf_start = self._find_leaf_with_first_key_occurence(key)
    (nr_of_elements, prev_leaf, next_leaf) = self._read_leaf_nr_of_elements_and_neighbours(containing_leaf_start)
    try:
        (leaf_start, record_index, doc_id, l_key, start, size, status) = self._find_key_in_leaf_for_update(key, doc_id, containing_leaf_start, nr_of_elements)
    except ElemNotFound:
        if next_leaf:
            nr_of_elements = self._read_leaf_nr_of_elements(next_leaf)
        else:
            raise TryReindexException()
        try:
            (leaf_start, record_index, doc_id, l_key, start, size, status) = self._find_key_in_leaf_for_update(key, doc_id, next_leaf, nr_of_elements)
        except ElemNotFound:
            raise TryReindexException()
    return (leaf_start, record_index, doc_id, l_key, start, size, status)
