Table of Contents

Class SpatialIndexFieldValueTypeBase

Namespace
Examine.Lucene.Spatial.Indexing
Assembly
Examine.Lucene.Spatial.dll

Spatial Index Field Value Type

public abstract class SpatialIndexFieldValueTypeBase : IndexFieldValueTypeBase, IIndexFieldValueType, ISpatialIndexFieldValueTypeBase, ISpatialIndexFieldValueTypeShapesBase
Inheritance
SpatialIndexFieldValueTypeBase
Implements
Derived
Inherited Members

Constructors

SpatialIndexFieldValueTypeBase(string, ILoggerFactory, Func<string, SpatialStrategy>, bool)

Constructor

protected SpatialIndexFieldValueTypeBase(string fieldName, ILoggerFactory loggerFactory, Func<string, SpatialStrategy> spatialStrategyFactory, bool store = true)

Parameters

fieldName string
loggerFactory ILoggerFactory
spatialStrategyFactory Func<string, SpatialStrategy>
store bool

Properties

ExamineSpatialShapeFactory

Gets the Shape Factory for the fields spatial strategy

public abstract IExamineSpatialShapeFactory ExamineSpatialShapeFactory { get; }

Property Value

IExamineSpatialShapeFactory

SpatialArgsParser

Spatial Args Parser for Field

public SpatialArgsParser SpatialArgsParser { get; }

Property Value

SpatialArgsParser

SpatialStrategy

Spatial Strategy for Field

public SpatialStrategy SpatialStrategy { get; }

Property Value

SpatialStrategy

Methods

GeoSpatialPrefixTreeStrategyFactory(int)

Creates a RecursivePrefixTreeStrategy for A Geo SpatialContext

public static Func<string, SpatialStrategy> GeoSpatialPrefixTreeStrategyFactory(int maxLevels = 11)

Parameters

maxLevels int

Default value of 11 results in sub-meter precision for geohash

Returns

Func<string, SpatialStrategy>

SpatialStrategy Factory

GetFilter(string, ExamineSpatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape>)

Gets a spatial filer as a Lucene Filter

public abstract Filter GetFilter(string field, ExamineSpatialOperation spatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape> shape)

Parameters

field string
spatialOperation ExamineSpatialOperation
shape Func<IExamineSpatialShapeFactory, IExamineSpatialShape>

Returns

Filter

GetQuery(string, ExamineSpatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape>)

Gets a spatial query as a Lucene Query

public abstract Query GetQuery(string field, ExamineSpatialOperation spatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape> shape)

Parameters

field string
spatialOperation ExamineSpatialOperation
shape Func<IExamineSpatialShapeFactory, IExamineSpatialShape>

Returns

Query

ToSpatialDistanceSortField(SortableField, SortDirection)

Converts an Examine Spatial SortableField to a Lucene SortField

public abstract SortField ToSpatialDistanceSortField(SortableField sortableField, SortDirection sortDirection)

Parameters

sortableField SortableField
sortDirection SortDirection

Returns

SortField