Merge "IndexConfig: Remove checkTypeLimit to restore supporting any type"
This commit is contained in:
@@ -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();
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user