C# 클래스 Lucene.Net.Search.SparseFacetedSearcher

Based on SimpleFacetedSearch. Uses DocID lists instead on bitmaps. Efficient memory usage for high cardinality sparsely populated facets.

Suitable for high cardinality, sparsely populated facets. i.e. There are a large number of facet values and each facet value is hit in a small percentage of documents. Especially if there are also a large number of documents. SimpleFacetedSearch holds a bitmap for each value representing whether that value is a hit is each document (approx 122KB per 1M documents per facet value). So this is an O(N*M) problem. The memory requirement can grow very quickly.

SparseFacetedSearcher records the DocID (Int32) for each value hit (memory cost = values * hits * 4). SimpleFacetedSearch record a bit for evey document per value (memory cost = values * documents / 8). So if the average number of hits for each value is less than 1/32 or 3.125% then Sparse is more memory efficient.

There are also some enumerable methods than mean there is much less pressure on the GC. Plus some bug fixes.

파일 보기 프로젝트 열기: Artesian/SparseFacetedSearch 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MAX_FACETS int

공개 메소드들

메소드 설명
Count ( Query query = null, int maxDocPerGroup = DefaultMaxDocPerGroup ) : FacetCountResult
Search ( Query query = null, int maxDocPerGroup = DefaultMaxDocPerGroup ) : FacetSearchResult
SparseFacetedSearcher ( IndexReader reader ) : System

비공개 메소드들

메소드 설명
SearchInternal ( Query query = null, int maxDocPerGroup = DefaultMaxDocPerGroup ) : IEnumerable

메소드 상세

Count() 공개 메소드

public Count ( Query query = null, int maxDocPerGroup = DefaultMaxDocPerGroup ) : FacetCountResult
query Query
maxDocPerGroup int
리턴 FacetCountResult

Search() 공개 메소드

public Search ( Query query = null, int maxDocPerGroup = DefaultMaxDocPerGroup ) : FacetSearchResult
query Query
maxDocPerGroup int
리턴 FacetSearchResult

SparseFacetedSearcher() 공개 메소드

public SparseFacetedSearcher ( IndexReader reader ) : System
reader Lucene.Net.Index.IndexReader
리턴 System

프로퍼티 상세

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

public static int MAX_FACETS
리턴 int