org.apache.lucene.spatial.prefix
Class PrefixTreeStrategy

java.lang.Object
  extended by org.apache.lucene.spatial.SpatialStrategy<SimpleSpatialFieldInfo>
      extended by org.apache.lucene.spatial.prefix.PrefixTreeStrategy
Direct Known Subclasses:
RecursivePrefixTreeStrategy, TermQueryPrefixTreeStrategy

public abstract class PrefixTreeStrategy
extends SpatialStrategy<SimpleSpatialFieldInfo>


Field Summary
protected  int defaultFieldValuesArrayLen
           
protected  double distErrPct
           
protected  SpatialPrefixTree grid
           
static FieldType TYPE_NOT_STORED
           
static FieldType TYPE_STORED
           
 
Fields inherited from class org.apache.lucene.spatial.SpatialStrategy
ctx, ignoreIncompatibleGeometry
 
Constructor Summary
PrefixTreeStrategy(SpatialPrefixTree grid)
           
 
Method Summary
 IndexableField createField(SimpleSpatialFieldInfo fieldInfo, com.spatial4j.core.shape.Shape shape, boolean index, boolean store)
          Corresponds with Solr's FieldType.createField().
 SpatialPrefixTree getGrid()
           
 ValueSource makeValueSource(com.spatial4j.core.query.SpatialArgs args, SimpleSpatialFieldInfo fieldInfo)
           
 ValueSource makeValueSource(com.spatial4j.core.query.SpatialArgs args, SimpleSpatialFieldInfo fieldInfo, com.spatial4j.core.distance.DistanceCalculator calc)
           
 void setDefaultFieldValuesArrayLen(int defaultFieldValuesArrayLen)
          Used in the in-memory ValueSource as a default ArrayList length for this field's array of values, per doc.
 void setDistErrPct(double distErrPct)
          See SpatialPrefixTree.getMaxLevelForPrecision(com.spatial4j.core.shape.Shape, double).
 
Methods inherited from class org.apache.lucene.spatial.SpatialStrategy
createFields, getSpatialContext, isIgnoreIncompatibleGeometry, isPolyField, makeFilter, makeQuery, setIgnoreIncompatibleGeometry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grid

protected final SpatialPrefixTree grid

defaultFieldValuesArrayLen

protected int defaultFieldValuesArrayLen

distErrPct

protected double distErrPct

TYPE_NOT_STORED

public static final FieldType TYPE_NOT_STORED

TYPE_STORED

public static final FieldType TYPE_STORED
Constructor Detail

PrefixTreeStrategy

public PrefixTreeStrategy(SpatialPrefixTree grid)
Method Detail

setDefaultFieldValuesArrayLen

public void setDefaultFieldValuesArrayLen(int defaultFieldValuesArrayLen)
Used in the in-memory ValueSource as a default ArrayList length for this field's array of values, per doc.


setDistErrPct

public void setDistErrPct(double distErrPct)
See SpatialPrefixTree.getMaxLevelForPrecision(com.spatial4j.core.shape.Shape, double).


createField

public IndexableField createField(SimpleSpatialFieldInfo fieldInfo,
                                  com.spatial4j.core.shape.Shape shape,
                                  boolean index,
                                  boolean store)
Description copied from class: SpatialStrategy
Corresponds with Solr's FieldType.createField(). This may return a null field if it does not want to make anything. This is reasonable behavior if 'ignoreIncompatibleGeometry=true' and the geometry is incompatible

Specified by:
createField in class SpatialStrategy<SimpleSpatialFieldInfo>

makeValueSource

public ValueSource makeValueSource(com.spatial4j.core.query.SpatialArgs args,
                                   SimpleSpatialFieldInfo fieldInfo)
Specified by:
makeValueSource in class SpatialStrategy<SimpleSpatialFieldInfo>

makeValueSource

public ValueSource makeValueSource(com.spatial4j.core.query.SpatialArgs args,
                                   SimpleSpatialFieldInfo fieldInfo,
                                   com.spatial4j.core.distance.DistanceCalculator calc)

getGrid

public SpatialPrefixTree getGrid()


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