@Override protected void init(IndexSchema schema, Map<String, String> args) { // Do NOT call super.init(); instead we delegate to an RPT field. Admittedly this is error // prone. // TODO Move this check to a call from AbstractSpatialFieldType.createFields() so the type can // declare // if it supports multi-valued or not. It's insufficient here; we can't see if you set // multiValued on the field. if (isMultiValued()) { throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "Not capable of multiValued: " + getTypeName()); } // Choose a better default distErrPct if not configured if (args.containsKey(SpatialArgsParser.DIST_ERR_PCT) == false) { args.put(SpatialArgsParser.DIST_ERR_PCT, DEFAULT_DIST_ERR_PCT); } rptFieldType = new SpatialRecursivePrefixTreeFieldType(); rptFieldType.setTypeName(getTypeName()); rptFieldType.properties = properties; rptFieldType.init(schema, args); rptFieldType.argsParser = argsParser = newSpatialArgsParser(); this.ctx = rptFieldType.ctx; this.distanceUnits = rptFieldType.distanceUnits; }