LUCENE-3795 removed seemingly needless catch of a Exception to merely log it. FWIW Tests pass.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3795_lsp_spatial_module@1299952 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Wayne Smiley 2012-03-13 02:09:54 +00:00
parent 02852d8da4
commit f2b7adab38
1 changed files with 10 additions and 15 deletions

View File

@ -160,22 +160,17 @@ public class TwoDoublesStrategy extends SpatialStrategy<TwoDoublesFieldInfo> {
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;
}
/**