public void init(Map<String, String> args) {
super.init(args);
maxShingleSize = getInt("maxShingleSize",
ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE);
if (maxShingleSize < 2) {
throw new SolrException(ErrorCode.SERVER_ERROR,
"Invalid maxShingleSize (" + maxShingleSize
+ ") - must be at least 2");
}
minShingleSize = getInt("minShingleSize",
ShingleFilter.DEFAULT_MIN_SHINGLE_SIZE);
if (minShingleSize < 2) {
throw new SolrException(ErrorCode.SERVER_ERROR,
"Invalid minShingleSize (" + minShingleSize
+ ") - must be at least 2");
}
if (minShingleSize > maxShingleSize) {
throw new SolrException(ErrorCode.SERVER_ERROR,
"Invalid minShingleSize (" + minShingleSize
+ ") - must be no greater than maxShingleSize ("
+ maxShingleSize + ")");
}
outputUnigrams = getBoolean("outputUnigrams", true);