diff --git a/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java b/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java index 1880a0cb221..1b2ec51cbf3 100644 --- a/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java +++ b/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java @@ -160,22 +160,17 @@ public class TwoDoublesStrategy extends SpatialStrategy { throw new UnsupportedSpatialOperation(args.getOperation()); } - try { - if( valueSource != null ) { - valueSource = new CachingDoubleValueSource(valueSource); - } - else { - valueSource = makeValueSource(args, fieldInfo); - } - Query spatialRankingQuery = new FunctionQuery(valueSource); - BooleanQuery bq = new BooleanQuery(); - bq.add(spatial,BooleanClause.Occur.MUST); - bq.add(spatialRankingQuery,BooleanClause.Occur.MUST); - return bq; - } catch(Exception ex) { - log.warn("error making score", ex); + if( valueSource != null ) { + valueSource = new CachingDoubleValueSource(valueSource); } - return spatial; + else { + valueSource = makeValueSource(args, fieldInfo); + } + Query spatialRankingQuery = new FunctionQuery(valueSource); + BooleanQuery bq = new BooleanQuery(); + bq.add(spatial,BooleanClause.Occur.MUST); + bq.add(spatialRankingQuery,BooleanClause.Occur.MUST); + return bq; } /**