C# Класс Bamboo.Prevalence.Indexing.SearchResult

Accumulates the results of a search.
Наследование: IEnumerable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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