void addOrSaveMapping(Object key, Object value, RegionEntry entry, boolean isAdd)
      throws IMQException {
    if (key == QueryService.UNDEFINED || (key != null && !(key instanceof Map))) {
      return;
    }
    if (isAllKeys) {
      // If the key is null or it has no elements then we cannot associate it
      // to any index key (it would apply to all). That is why
      // this type of index does not support !=
      // queries or queries comparing with null.
      if (key == null) {
        return;
      }
      for (Map.Entry<?, ?> mapEntry : ((Map<?, ?>) key).entrySet()) {
        Object mapKey = mapEntry.getKey();
        Object indexKey = mapEntry.getValue();
        if (isAdd) {
          doIndexAddition(mapKey, indexKey, value, entry);
        } else {
          saveIndexAddition(mapKey, indexKey, value, entry);
        }
      }
    } else {
      for (Object mapKey : mapKeys) {
        Object indexKey;
        if (key == null) {
          indexKey = QueryService.UNDEFINED;
        } else {
          indexKey = ((Map<?, ?>) key).get(mapKey);
        }
        if (isAdd) {
          doIndexAddition(mapKey, indexKey, value, entry);
        } else {
          saveIndexAddition(mapKey, indexKey, value, entry);
        }
      }
    }
  }
Return the total number of times this index has been updated
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractMapIndex.java