synchronized void setPdxStringFlag(Object key) {
    // For Null and Undefined keys do not set the isIndexedPdxKeysFlagSet flag
    if (isIndexedPdxKeysFlagSet || key == null || key == IndexManager.NULL
        || key == QueryService.UNDEFINED) {
      return;
    }
    if (!isIndexedPdxKeys) {
      if (region.getAttributes().getEvictionAttributes().isNoEviction() == true
          && key instanceof PdxString && region.getAttributes().getCompressor() == null) {
        isIndexedPdxKeys = true;
      }
    }
    isIndexedPdxKeysFlagSet = true;
  }
Sets the isIndexedPdxKeys flag indicating if all the keys in the index are Strings or
PdxStrings. Also sets another flag isIndexedPdxKeysFlagSet that indicates isIndexedPdxKeys has
been set/reset to avoid frequent calculation of map size
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java