org.apache.lucene.benchmark.byTask.feeds
Class SpatialFileQueryMaker

java.lang.Object
  extended by org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
      extended by 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 created LineDocSource. It's parsed by SpatialContext.readShapeFromWkt(String) (String)} and then further manipulated via a configurable SpatialDocMaker.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 & cached in advance. This query maker works in conjunction with SpatialDocMaker. See spatial.alg for a listing of options, in particular the options starting with "query.".


Field Summary
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
SpatialFileQueryMaker()
           
 
Method Summary
protected  Query makeQueryFromShape(com.spatial4j.core.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strategy

protected SpatialStrategy strategy

distErrPct

protected double distErrPct

operation

protected SpatialOperation operation

score

protected boolean score

shapeConverter

protected SpatialDocMaker.ShapeConverter shapeConverter
Constructor Detail

SpatialFileQueryMaker

public SpatialFileQueryMaker()
Method Detail

setConfig

public void setConfig(Config config)
               throws Exception
Description copied from interface: QueryMaker
Set the properties

Specified by:
setConfig in interface QueryMaker
Overrides:
setConfig in class AbstractQueryMaker
Throws:
Exception

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Specified by:
prepareQueries in class AbstractQueryMaker
Throws:
Exception

makeQueryFromShape

protected Query makeQueryFromShape(com.spatial4j.core.shape.Shape shape)


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.