Package org.apache.solr.legacy
Class BBoxStrategy
- java.lang.Object
- 
- org.apache.lucene.spatial.SpatialStrategy
- 
- org.apache.solr.legacy.BBoxStrategy
 
 
- 
 @Deprecated public class BBoxStrategy extends org.apache.lucene.spatial.SpatialStrategy Deprecated.A SpatialStrategy for indexing and searching Rectangles by storing its coordinates in numeric fields. It supports allSpatialOperations and has a custom overlap relevancy. It is based on GeoPortal's SpatialClauseAdapter.Characteristics: 
 - Only indexes Rectangles; just one per field value. Other shapes can be provided and the bounding box will be used.
- Can query only by a Rectangle. Providing other shapes is an error.
- Supports most SpatialOperations but not Overlaps.
- Uses the DocValues API for any sorting / relevancy.
 Implementation: This uses 4 double fields for minX, maxX, minY, maxY and a boolean to mark a dateline cross. Depending on the particular SpatialOperations, there are a variety of range queries onDoublePoints to be done. ThemakeOverlapRatioValueSource(org.locationtech.spatial4j.shape.Rectangle, double)works by calculating the query bbox overlap percentage against the indexed shape overlap percentage. The indexed shape's coordinates are retrieved fromLeafReader.getNumericDocValues(java.lang.String).- WARNING: This API is experimental and might change in incompatible ways in the next release.
 
- 
- 
Field SummaryFields Modifier and Type Field Description static org.apache.lucene.document.FieldTypeDEFAULT_FIELDTYPEDeprecated.pointValues, docValues, and nothing else.static LegacyFieldTypeLEGACY_FIELDTYPEDeprecated.static StringSUFFIX_MAXXDeprecated.static StringSUFFIX_MAXYDeprecated.static StringSUFFIX_MINXDeprecated.static StringSUFFIX_MINYDeprecated.static StringSUFFIX_XDLDeprecated.
 - 
Constructor SummaryConstructors Constructor Description BBoxStrategy(org.locationtech.spatial4j.context.SpatialContext ctx, String fieldNamePrefix, org.apache.lucene.document.FieldType fieldType)Deprecated.Creates this strategy.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.lucene.document.Field[]createIndexableFields(org.locationtech.spatial4j.shape.Shape shape)Deprecated.org.apache.lucene.document.FieldTypegetFieldType()Deprecated.Returns a field type representing the set of field options.org.apache.lucene.search.DoubleValuesSourcemakeDistanceValueSource(org.locationtech.spatial4j.shape.Point queryPoint, double multiplier)Deprecated.org.apache.lucene.search.DoubleValuesSourcemakeOverlapRatioValueSource(org.locationtech.spatial4j.shape.Rectangle queryBox, double queryTargetProportion)Deprecated.Returns a similarity based onBBoxOverlapRatioValueSource.org.apache.lucene.search.QuerymakeQuery(org.apache.lucene.spatial.query.SpatialArgs args)Deprecated.org.apache.lucene.spatial.ShapeValuesSourcemakeShapeValueSource()Deprecated.Provides access to each rectangle per documentstatic BBoxStrategynewInstance(org.locationtech.spatial4j.context.SpatialContext ctx, String fieldNamePrefix)Deprecated.Creates a newBBoxStrategyinstance that usesDoublePointandDoublePoint.newRangeQuery(java.lang.String, double, double)static BBoxStrategynewLegacyInstance(org.locationtech.spatial4j.context.SpatialContext ctx, String fieldNamePrefix)Deprecated.LegacyNumerics will be removed
 
- 
- 
- 
Field Detail- 
DEFAULT_FIELDTYPEpublic static org.apache.lucene.document.FieldType DEFAULT_FIELDTYPE Deprecated.pointValues, docValues, and nothing else.
 - 
LEGACY_FIELDTYPE@Deprecated public static LegacyFieldType LEGACY_FIELDTYPE Deprecated.
 - 
SUFFIX_MINXpublic static final String SUFFIX_MINX Deprecated.- See Also:
- Constant Field Values
 
 - 
SUFFIX_MAXXpublic static final String SUFFIX_MAXX Deprecated.- See Also:
- Constant Field Values
 
 - 
SUFFIX_MINYpublic static final String SUFFIX_MINY Deprecated.- See Also:
- Constant Field Values
 
 - 
SUFFIX_MAXYpublic static final String SUFFIX_MAXY Deprecated.- See Also:
- Constant Field Values
 
 - 
SUFFIX_XDLpublic static final String SUFFIX_XDL Deprecated.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
BBoxStrategypublic BBoxStrategy(org.locationtech.spatial4j.context.SpatialContext ctx, String fieldNamePrefix, org.apache.lucene.document.FieldType fieldType)Deprecated.Creates this strategy.fieldTypeis used to customize the indexing options of the 4 number fields, and to a lesser degree the XDL field too. Search requires pointValues (or legacy numerics), and relevancy requires docValues. If these features aren't needed then disable them.
 
- 
 - 
Method Detail- 
newInstancepublic static BBoxStrategy newInstance(org.locationtech.spatial4j.context.SpatialContext ctx, String fieldNamePrefix) Deprecated.Creates a newBBoxStrategyinstance that usesDoublePointandDoublePoint.newRangeQuery(java.lang.String, double, double)
 - 
newLegacyInstance@Deprecated public static BBoxStrategy newLegacyInstance(org.locationtech.spatial4j.context.SpatialContext ctx, String fieldNamePrefix) Deprecated.LegacyNumerics will be removedCreates a newBBoxStrategyinstance that usesLegacyDoubleFieldfor backwards compatibility
 - 
getFieldTypepublic org.apache.lucene.document.FieldType getFieldType() Deprecated.Returns a field type representing the set of field options. This is identical to what was passed into the constructor. It's frozen.
 - 
createIndexableFieldspublic org.apache.lucene.document.Field[] createIndexableFields(org.locationtech.spatial4j.shape.Shape shape) Deprecated.- Specified by:
- createIndexableFieldsin class- org.apache.lucene.spatial.SpatialStrategy
 
 - 
makeShapeValueSourcepublic org.apache.lucene.spatial.ShapeValuesSource makeShapeValueSource() Deprecated.Provides access to each rectangle per document
 - 
makeDistanceValueSourcepublic org.apache.lucene.search.DoubleValuesSource makeDistanceValueSource(org.locationtech.spatial4j.shape.Point queryPoint, double multiplier)Deprecated.- Specified by:
- makeDistanceValueSourcein class- org.apache.lucene.spatial.SpatialStrategy
 
 - 
makeOverlapRatioValueSourcepublic org.apache.lucene.search.DoubleValuesSource makeOverlapRatioValueSource(org.locationtech.spatial4j.shape.Rectangle queryBox, double queryTargetProportion)Deprecated.Returns a similarity based onBBoxOverlapRatioValueSource. This is just a convenience method.
 - 
makeQuerypublic org.apache.lucene.search.Query makeQuery(org.apache.lucene.spatial.query.SpatialArgs args) Deprecated.- Specified by:
- makeQueryin class- org.apache.lucene.spatial.SpatialStrategy
 
 
- 
 
-