public class NumberRangePrefixTreeStrategy extends RecursivePrefixTreeStrategy
DateRangePrefixTree
.multiOverlappingIndexedShapes, pointsOnly, prefixGridScanLevel, pruneLeafyBranches
defaultFieldValuesArrayLen, distErrPct, FIELD_TYPE, grid
ctx
Constructor and Description |
---|
NumberRangePrefixTreeStrategy(NumberRangePrefixTree prefixTree,
String fieldName) |
Modifier and Type | Method and Description |
---|---|
Field[] |
createIndexableFields(com.spatial4j.core.shape.Shape shape)
Returns the IndexableField(s) from the
shape that are to be
added to the Document . |
NumberRangePrefixTree |
getGrid() |
ValueSource |
makeDistanceValueSource(com.spatial4j.core.shape.Point queryPoint,
double multiplier)
Unsupported.
|
createTokenStream, makeFilter, setMultiOverlappingIndexedShapes, setPointsOnly, setPrefixGridScanLevel, setPruneLeafyBranches, toString
createIndexableFields, getDistErrPct, setDefaultFieldValuesArrayLen, setDistErrPct
getFieldName, getSpatialContext, makeDistanceValueSource, makeQuery, makeRecipDistanceValueSource
public NumberRangePrefixTreeStrategy(NumberRangePrefixTree prefixTree, String fieldName)
public NumberRangePrefixTree getGrid()
getGrid
in class PrefixTreeStrategy
public Field[] createIndexableFields(com.spatial4j.core.shape.Shape shape)
SpatialStrategy
shape
that are to be
added to the Document
. These fields
are expected to be marked as indexed and not stored.
Note: If you want to store the shape as a string for retrieval in
search results, you could add it like this:
document.add(new StoredField(fieldName,ctx.toString(shape)));The particular string representation used doesn't matter to the Strategy since it doesn't use it.
createIndexableFields
in class PrefixTreeStrategy
public ValueSource makeDistanceValueSource(com.spatial4j.core.shape.Point queryPoint, double multiplier)
makeDistanceValueSource
in class PrefixTreeStrategy
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.