def load_from_data(self, data, with_undefined=False):
        """Load index structure.

        :param with_undefined: Load undefined keys as well
        :type with_undefined: bool

        """
        if with_undefined:
            defined_values, undefined_values = data
        else:
            defined_values = data
            undefined_values = None
        self._index = defaultdict(list, defined_values)
        self._reverse_index = defaultdict(list)
        for key, values in self._index.items():
            for value in values:
                self._reverse_index[value].append(key)
        if undefined_values:
            self._undefined_keys = {key: True for key in undefined_values}
        else:
            self._undefined_keys = {}
Load index structure.

        :param with_undefined: Load undefined keys as well
        :type with_undefined: bool