public class NumberRangePrefixTreeStrategy extends RecursivePrefixTreeStrategy
DateRangePrefixTree
.Modifier and Type | Class and Description |
---|---|
static class |
NumberRangePrefixTreeStrategy.Facets
Facet response information
|
multiOverlappingIndexedShapes, prefixGridScanLevel, pruneLeafyBranches
defaultFieldValuesArrayLen, distErrPct, FIELD_TYPE, grid, pointsOnly
ctx
Constructor and Description |
---|
NumberRangePrefixTreeStrategy(NumberRangePrefixTree prefixTree,
String fieldName) |
Modifier and Type | Method and Description |
---|---|
NumberRangePrefixTreeStrategy.Facets |
calcFacets(IndexReaderContext context,
Bits topAcceptDocs,
NumberRangePrefixTree.UnitNRShape start,
NumberRangePrefixTree.UnitNRShape end)
Calculates facets between
start and end to a detail level one greater than that provided by the
arguments. |
NumberRangePrefixTreeStrategy.Facets |
calcFacets(IndexReaderContext context,
Bits topAcceptDocs,
org.locationtech.spatial4j.shape.Shape facetRange,
int level)
Calculates facets (aggregated counts) given a range shape (start-end span) and a level, which specifies the detail.
|
NumberRangePrefixTree |
getGrid() |
protected boolean |
isGridAlignedShape(org.locationtech.spatial4j.shape.Shape shape)
A quick check of the shape to see if it is perfectly aligned to a grid.
|
protected boolean |
isPointShape(org.locationtech.spatial4j.shape.Shape shape)
Returns true if the
shape is a Point . |
DoubleValuesSource |
makeDistanceValueSource(org.locationtech.spatial4j.shape.Point queryPoint,
double multiplier)
Unsupported.
|
createCellIteratorToIndex, getPrefixGridScanLevel, isMultiOverlappingIndexedShapes, isPruneLeafyBranches, makeGridShapeIntersectsQuery, makeQuery, setMultiOverlappingIndexedShapes, setPrefixGridScanLevel, setPruneLeafyBranches, toString
calcFacets, createIndexableFields, createIndexableFields, createIndexableFields, getDistErrPct, isPointsOnly, newCellToBytesRefIterator, setDefaultFieldValuesArrayLen, setDistErrPct, setPointsOnly
getFieldName, getSpatialContext, makeDistanceValueSource, makeRecipDistanceValueSource
public NumberRangePrefixTreeStrategy(NumberRangePrefixTree prefixTree, String fieldName)
public NumberRangePrefixTree getGrid()
getGrid
in class PrefixTreeStrategy
protected boolean isPointShape(org.locationtech.spatial4j.shape.Shape shape)
PrefixTreeStrategy
shape
is a Point
. For custom spatial contexts, it may make sense to
have certain other shapes return true.isPointShape
in class PrefixTreeStrategy
protected boolean isGridAlignedShape(org.locationtech.spatial4j.shape.Shape shape)
RecursivePrefixTreeStrategy
isGridAlignedShape
in class RecursivePrefixTreeStrategy
public DoubleValuesSource makeDistanceValueSource(org.locationtech.spatial4j.shape.Point queryPoint, double multiplier)
makeDistanceValueSource
in class PrefixTreeStrategy
public NumberRangePrefixTreeStrategy.Facets calcFacets(IndexReaderContext context, Bits topAcceptDocs, NumberRangePrefixTree.UnitNRShape start, NumberRangePrefixTree.UnitNRShape end) throws IOException
start
and end
to a detail level one greater than that provided by the
arguments. For example providing March to October of 2014 would return facets to the day level of those months.
This is just a convenience method.IOException
calcFacets(IndexReaderContext, Bits, Shape, int)
public NumberRangePrefixTreeStrategy.Facets calcFacets(IndexReaderContext context, Bits topAcceptDocs, org.locationtech.spatial4j.shape.Shape facetRange, int level) throws IOException
NumberRangePrefixTree.toUnitShape(Object)
then call
NumberRangePrefixTree.UnitNRShape.getLevel()
.
Facet computation is implemented by navigating the underlying indexed terms efficiently.IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.