Class SpatialFileQueryMaker
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
-
- org.apache.lucene.benchmark.byTask.feeds.SpatialFileQueryMaker
-
- All Implemented Interfaces:
QueryMaker
public class SpatialFileQueryMaker extends AbstractQueryMaker
Reads spatial data from the body field docs from an internally createdLineDocSource. It's parsed bySpatialContext.readShapeFromWkt(String)(String)} and then further manipulated via a configurableSpatialDocMaker.ShapeConverter. When using point data, it's likely you'll want to configure the shape converter so that the query shapes actually cover a region. The queries are all created and cached in advance. This query maker works in conjunction withSpatialDocMaker. See spatial.alg for a listing of options, in particular the options starting with "query.".
-
-
Field Summary
Fields Modifier and Type Field Description protected doubledistErrPctprotected SpatialOperationoperationprotected booleanscoreprotected SpatialDocMaker.ShapeConvertershapeConverterprotected SpatialStrategystrategy-
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
config, qnum, queries
-
-
Constructor Summary
Constructors Constructor Description SpatialFileQueryMaker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QuerymakeQueryFromShape(org.locationtech.spatial4j.shape.Shape shape)protected Query[]prepareQueries()voidsetConfig(Config config)Set the properties-
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
makeQuery, makeQuery, nextQnum, printQueries, resetInputs
-
-
-
-
Field Detail
-
strategy
protected SpatialStrategy strategy
-
distErrPct
protected double distErrPct
-
operation
protected SpatialOperation operation
-
score
protected boolean score
-
shapeConverter
protected SpatialDocMaker.ShapeConverter shapeConverter
-
-
Method Detail
-
setConfig
public void setConfig(Config config) throws Exception
Description copied from interface:QueryMakerSet the properties- Specified by:
setConfigin interfaceQueryMaker- Overrides:
setConfigin classAbstractQueryMaker- Throws:
Exception
-
prepareQueries
protected Query[] prepareQueries() throws Exception
- Specified by:
prepareQueriesin classAbstractQueryMaker- Throws:
Exception
-
makeQueryFromShape
protected Query makeQueryFromShape(org.locationtech.spatial4j.shape.Shape shape)
-
-