mirror of https://github.com/apache/lucene.git
Merged revision(s) 1672531 from lucene/dev/branches/branch_5x:
SOLR-7373: let AbstractSpatialFieldType set the context ........ git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1672533 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6bed01b2ae
commit
a2d29b8e12
|
@ -113,11 +113,13 @@ public abstract class AbstractSpatialFieldType<T extends SpatialStrategy> extend
|
||||||
protected void init(IndexSchema schema, Map<String, String> args) {
|
protected void init(IndexSchema schema, Map<String, String> args) {
|
||||||
super.init(schema, args);
|
super.init(schema, args);
|
||||||
|
|
||||||
//Solr expects us to remove the parameters we've used.
|
if(ctx==null) { // subclass can set this directly
|
||||||
MapListener<String, String> argsWrap = new MapListener<>(args);
|
//Solr expects us to remove the parameters we've used.
|
||||||
ctx = SpatialContextFactory.makeSpatialContext(argsWrap, schema.getResourceLoader().getClassLoader());
|
MapListener<String, String> argsWrap = new MapListener<>(args);
|
||||||
args.keySet().removeAll(argsWrap.getSeenKeys());
|
ctx = SpatialContextFactory.makeSpatialContext(argsWrap, schema.getResourceLoader().getClassLoader());
|
||||||
|
args.keySet().removeAll(argsWrap.getSeenKeys());
|
||||||
|
}
|
||||||
|
|
||||||
final String unitsErrMsg = "units parameter is deprecated, please use distanceUnits instead for field types with class " +
|
final String unitsErrMsg = "units parameter is deprecated, please use distanceUnits instead for field types with class " +
|
||||||
getClass().getSimpleName();
|
getClass().getSimpleName();
|
||||||
this.units = args.remove("units");//deprecated
|
this.units = args.remove("units");//deprecated
|
||||||
|
|
Loading…
Reference in New Issue