mirror of https://github.com/apache/lucene.git
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:
parent
02852d8da4
commit
f2b7adab38
|
@ -160,22 +160,17 @@ public class TwoDoublesStrategy extends SpatialStrategy<TwoDoublesFieldInfo> {
|
||||||
throw new UnsupportedSpatialOperation(args.getOperation());
|
throw new UnsupportedSpatialOperation(args.getOperation());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if( valueSource != null ) {
|
||||||
if( valueSource != null ) {
|
valueSource = new CachingDoubleValueSource(valueSource);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue