code: def update_index(self, key, value):
          "Update the index with the new key/values."
          for k, v in value.items():
              if k in self.indexes:
                  # A non-string index value switches it into a lazy one.
                  if not isinstance(v, six.string_types):
                      self.index_defs[k]['type'] = 'lazy'
                  if v not in self.indexes[k]:
                      self.indexes[k][v] = set([])
                  self.indexes[k][v].add(keyf update_index(self, key, value):
          "Update the index with the new key/values."
          for k, v in value.items():
              if k in self.indexes:
                  # A non-string index value switches it into a lazy one.
                  if not isinstance(v, six.string_types):
                      self.index_defs[k]['type'] = 'lazy'
                  if v not in self.indexes[k]:
                      self.indexes[k][v] = set([])
                  self.indexes[k][v].add(key)
docs: Update the index with the new key/values.