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 double
distErrPct
protected SpatialOperation
operation
protected boolean
score
protected SpatialDocMaker.ShapeConverter
shapeConverter
protected SpatialStrategy
strategy
-
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 Query
makeQueryFromShape(org.locationtech.spatial4j.shape.Shape shape)
protected Query[]
prepareQueries()
void
setConfig(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:QueryMaker
Set the properties- Specified by:
setConfig
in interfaceQueryMaker
- Overrides:
setConfig
in classAbstractQueryMaker
- Throws:
Exception
-
prepareQueries
protected Query[] prepareQueries() throws Exception
- Specified by:
prepareQueries
in classAbstractQueryMaker
- Throws:
Exception
-
makeQueryFromShape
protected Query makeQueryFromShape(org.locationtech.spatial4j.shape.Shape shape)
-
-