mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
10.41.2007 325b2ee4a27d0c24aa0a539f7bd0a8cf24905ff7
opends/src/server/org/opends/server/backends/jeb/Config.java
@@ -634,6 +634,7 @@
    indexTypeSet.add("equality");
    indexTypeSet.add("substring");
    indexTypeSet.add("ordering");
    indexTypeSet.add("approximate");
    typeStub =
         new MultiChoiceConfigAttribute(ATTR_INDEX_TYPE, msg, false,
                                   true, true, indexTypeSet);
@@ -766,6 +767,16 @@
              throw new ConfigException(messageID, message);
            }
          }
          else if (indexType.equalsIgnoreCase("approximate"))
          {
            indexConfig.setApproximateIndex(true);
            if(attrType.getApproximateMatchingRule() == null)
            {
              int messageID = MSGID_CONFIG_INDEX_TYPE_NEEDS_MATCHING_RULE;
              String message = getMessage(messageID, attrType, indexType);
              throw new ConfigException(messageID, message);
            }
          }
        }
      }
    }