C# 클래스 Bamboo.Prevalence.Indexing.SearchResult

Accumulates the results of a search.
상속: IEnumerable
파일 보기 프로젝트 열기: bamboo/Bamboo.Prevalence 1 사용 예제들

공개 메소드들

메소드 설명
Add ( SearchHit hit ) : void

Adds a new item to the collection of items returned by the search. If the hit represents an existing record it will be combined to the existing hit instead.

Contains ( IRecord record ) : bool

Checks if the specified record was returned by the search.

reference comparison is always used

Filter ( ISearchHitFilter filter ) : SearchResult

Build a new SearchResult object including only those elements for which the filter returns true.

GetEnumerator ( ) : IEnumerator

See IEnumerable.GetEnumerator for details

GetRecordEnumerator ( ) : SearchHitRecordEnumerator

Returns an enumerator for all the records in this object.

Intersect ( SearchResult other ) : SearchResult

Set intersection operation. Creates a new SearchResult with all the records that exist in both SearchResult objects.

all the SearchHit objects in the resulting SearchResult are clones from the original ones combined to the ones in other

SearchResult ( ) : System

Creates an empty SearchResult object.

Sort ( IComparer comparer ) : void

Sorts the result using the specified comparer.

SortByField ( string field ) : void

Sorts the result by a specific record field.

ToRecordArray ( ) : Array
ToRecordArray ( Type recordType ) : Array

Copies all the records to an array. The order is mantained so that this[N].Record == resultingArray[N] is valid for every 0 <= N < this.Count.

this ( int index ) : SearchHit

Returns an item by its position

보호된 메소드들

메소드 설명
FindSearchHit ( IRecord record ) : SearchHit

Finds a SearchHit that represents a specific record.

메소드 상세

Add() 공개 메소드

Adds a new item to the collection of items returned by the search. If the hit represents an existing record it will be combined to the existing hit instead.
public Add ( SearchHit hit ) : void
hit SearchHit the hit to be added or /// combined to a existing hit
리턴 void

Contains() 공개 메소드

Checks if the specified record was returned by the search.
reference comparison is always used
public Contains ( IRecord record ) : bool
record IRecord record to be checked
리턴 bool

Filter() 공개 메소드

Build a new SearchResult object including only those elements for which the filter returns true.
public Filter ( ISearchHitFilter filter ) : SearchResult
filter ISearchHitFilter filter
리턴 SearchResult

FindSearchHit() 보호된 메소드

Finds a SearchHit that represents a specific record.
protected FindSearchHit ( IRecord record ) : SearchHit
record IRecord the record to search for
리턴 SearchHit

GetEnumerator() 공개 메소드

See IEnumerable.GetEnumerator for details
public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

GetRecordEnumerator() 공개 메소드

Returns an enumerator for all the records in this object.
public GetRecordEnumerator ( ) : SearchHitRecordEnumerator
리턴 SearchHitRecordEnumerator

Intersect() 공개 메소드

Set intersection operation. Creates a new SearchResult with all the records that exist in both SearchResult objects.
all the SearchHit objects in the resulting SearchResult are clones from the original ones combined to the ones in other
public Intersect ( SearchResult other ) : SearchResult
other SearchResult
리턴 SearchResult

SearchResult() 공개 메소드

Creates an empty SearchResult object.
public SearchResult ( ) : System
리턴 System

Sort() 공개 메소드

Sorts the result using the specified comparer.
public Sort ( IComparer comparer ) : void
comparer IComparer
리턴 void

SortByField() 공개 메소드

Sorts the result by a specific record field.
public SortByField ( string field ) : void
field string the field to be used in the sort
리턴 void

ToRecordArray() 공개 메소드

public ToRecordArray ( ) : Array
리턴 System.Array

ToRecordArray() 공개 메소드

Copies all the records to an array. The order is mantained so that this[N].Record == resultingArray[N] is valid for every 0 <= N < this.Count.
public ToRecordArray ( Type recordType ) : Array
recordType System.Type array element type
리턴 System.Array

this() 공개 메소드

Returns an item by its position
public this ( int index ) : SearchHit
index int
리턴 SearchHit