C# 클래스 Lucene.Net.Spatial.Prefix.PrefixTreeStrategy

An abstract SpatialStrategy based on Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree . The two subclasses are RecursivePrefixTreeStrategy and TermQueryPrefixTreeStrategy . This strategy is most effective as a fast approximate spatial search filter.

Characteristics:

  • Can index any shape; however only RecursivePrefixTreeStrategy can effectively search non-point shapes.
  • Can index a variable number of shapes per field value. This strategy can do it via multiple calls to CreateIndexableFields(Shape) for a document or by giving it some sort of Shape aggregate (e.g. JTS WKT MultiPoint). The shape's boundary is approximated to a grid precision.
  • Can query with any shape. The shape's boundary is approximated to a grid precision.
  • Only Lucene.Net.Spatial.Query.SpatialOperation.Intersects is supported. If only points are indexed then this is effectively equivalent to IsWithin.
  • The strategy supports MakeDistanceValueSource(Point) even for multi-valued data, so long as the indexed data is all points; the behavior is undefined otherwise. However, it will likely be removed in the future in lieu of using another strategy with a more scalable implementation. Use of this call is the only circumstance in which a cache is used. The cache is simple but as such it doesn't scale to large numbers of points nor is it real-time-search friendly.

Implementation:

The Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree does most of the work, for example returning a list of terms representing grids of various sizes for a supplied shape. An important configuration item is SetDistErrPct(double) which balances shape precision against scalability. See those javadocs.
상속: SpatialStrategy
파일 보기 프로젝트 열기: apache/lucenenet

공개 프로퍼티들

프로퍼티 타입 설명
FIELD_TYPE Lucene.Net.Documents.FieldType

보호된 프로퍼티들

프로퍼티 타입 설명
defaultFieldValuesArrayLen int
distErrPct double
grid Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree
simplifyIndexedCells bool

공개 메소드들

메소드 설명
CreateIndexableFields ( IShape shape ) : Lucene.Net.Documents.Field[]
CreateIndexableFields ( IShape shape, double distErr ) : Lucene.Net.Documents.Field[]
MakeDistanceValueSource ( IPoint queryPoint, double multiplier ) : Lucene.Net.Search.Function.ValueSource
PrefixTreeStrategy ( SpatialPrefixTree grid, string fieldName, bool simplifyIndexedCells ) : System.Collections.Concurrent

비공개 메소드들

메소드 설명
PrefixTreeStrategy ( ) : System.Collections.Concurrent

메소드 상세

CreateIndexableFields() 공개 메소드

public CreateIndexableFields ( IShape shape ) : Lucene.Net.Documents.Field[]
shape IShape
리턴 Lucene.Net.Documents.Field[]

CreateIndexableFields() 공개 메소드

public CreateIndexableFields ( IShape shape, double distErr ) : Lucene.Net.Documents.Field[]
shape IShape
distErr double
리턴 Lucene.Net.Documents.Field[]

MakeDistanceValueSource() 공개 메소드

public MakeDistanceValueSource ( IPoint queryPoint, double multiplier ) : Lucene.Net.Search.Function.ValueSource
queryPoint IPoint
multiplier double
리턴 Lucene.Net.Search.Function.ValueSource

PrefixTreeStrategy() 공개 메소드

public PrefixTreeStrategy ( SpatialPrefixTree grid, string fieldName, bool simplifyIndexedCells ) : System.Collections.Concurrent
grid Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree
fieldName string
simplifyIndexedCells bool
리턴 System.Collections.Concurrent

프로퍼티 상세

FIELD_TYPE 공개적으로 정적으로 프로퍼티

Indexed, tokenized, not stored.
public static FieldType,Lucene.Net.Documents FIELD_TYPE
리턴 Lucene.Net.Documents.FieldType

defaultFieldValuesArrayLen 보호되어 있는 프로퍼티

protected int defaultFieldValuesArrayLen
리턴 int

distErrPct 보호되어 있는 프로퍼티

protected double distErrPct
리턴 double

grid 보호되어 있는 프로퍼티

protected SpatialPrefixTree,Lucene.Net.Spatial.Prefix.Tree grid
리턴 Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree

simplifyIndexedCells 보호되어 있는 프로퍼티

protected bool simplifyIndexedCells
리턴 bool