mirror of https://github.com/apache/lucene.git
add clover hack
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1358377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
05ef395e96
commit
007b8d6a82
|
@ -59,22 +59,39 @@ public class PortedSolr3Test extends StrategyTestCase {
|
|||
|
||||
grid = new GeohashPrefixTree(ctx,12);
|
||||
strategy = new RecursivePrefixTreeStrategy(grid, "recursive_geohash");
|
||||
ctorArgs.add(new Object[]{strategy});
|
||||
ctorArgs.add(new Object[]{new Param(strategy, "recursive_geohash")});
|
||||
|
||||
grid = new QuadPrefixTree(ctx,25);
|
||||
strategy = new RecursivePrefixTreeStrategy(grid, "recursive_quad");
|
||||
ctorArgs.add(new Object[]{strategy});
|
||||
ctorArgs.add(new Object[]{new Param(strategy, "recursive_quad")});
|
||||
|
||||
grid = new GeohashPrefixTree(ctx,12);
|
||||
strategy = new TermQueryPrefixTreeStrategy(grid, "termquery_geohash");
|
||||
ctorArgs.add(new Object[]{strategy});
|
||||
ctorArgs.add(new Object[]{new Param(strategy, "termquery_geohash")});
|
||||
|
||||
return ctorArgs;
|
||||
}
|
||||
|
||||
// this is a hack for clover!
|
||||
static class Param {
|
||||
SpatialStrategy strategy;
|
||||
String description;
|
||||
|
||||
Param(SpatialStrategy strategy, String description) {
|
||||
this.strategy = strategy;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
||||
// private String fieldName;
|
||||
|
||||
public PortedSolr3Test(SpatialStrategy strategy) {
|
||||
public PortedSolr3Test(Param param) {
|
||||
SpatialStrategy strategy = param.strategy;
|
||||
this.ctx = strategy.getSpatialContext();
|
||||
this.strategy = strategy;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue