Merge "IndexConfig: Remove checkTypeLimit to restore supporting any type"

This commit is contained in:
Patrick Hiesel
2019-10-01 12:13:01 +00:00
committed by Gerrit Code Review

View File

@@ -91,7 +91,6 @@ public abstract class IndexConfig {
checkLimit(cfg.maxLimit(), "maxLimit");
checkLimit(cfg.maxPages(), "maxPages");
checkLimit(cfg.maxTerms(), "maxTerms");
checkTypeLimit(cfg);
return cfg;
}
}
@@ -100,12 +99,6 @@ public abstract class IndexConfig {
checkArgument(limit > 0, "%s must be positive: %s", name, limit);
}
private static void checkTypeLimit(IndexConfig cfg) {
String limit = cfg.type();
boolean known = IndexType.getKnownTypes().asList().contains(limit);
checkArgument(known, "type must be known: %s", limit);
}
/**
* @return maximum limit supported by the underlying index, or limited for performance reasons.
*/
@@ -123,7 +116,7 @@ public abstract class IndexConfig {
*/
public abstract int maxTerms();
/** @return index type, limited to be either one of the known types. */
/** @return index type. */
public abstract String type();
/**