C# Class Bamboo.Prevalence.Indexing.SearchResult

Accumulates the results of a search.
Inheritance: IEnumerable
Afficher le fichier Open project: bamboo/Bamboo.Prevalence Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
FindSearchHit ( IRecord record ) : SearchHit

Finds a SearchHit that represents a specific record.

Method Details

Add() public méthode

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
Résultat void

Contains() public méthode

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
Résultat bool

Filter() public méthode

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

FindSearchHit() protected méthode

Finds a SearchHit that represents a specific record.
protected FindSearchHit ( IRecord record ) : SearchHit
record IRecord the record to search for
Résultat SearchHit

GetEnumerator() public méthode

See IEnumerable.GetEnumerator for details
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

GetRecordEnumerator() public méthode

Returns an enumerator for all the records in this object.
public GetRecordEnumerator ( ) : SearchHitRecordEnumerator
Résultat SearchHitRecordEnumerator

Intersect() public méthode

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
Résultat SearchResult

SearchResult() public méthode

Creates an empty SearchResult object.
public SearchResult ( ) : System
Résultat System

Sort() public méthode

Sorts the result using the specified comparer.
public Sort ( IComparer comparer ) : void
comparer IComparer
Résultat void

SortByField() public méthode

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

ToRecordArray() public méthode

public ToRecordArray ( ) : Array
Résultat System.Array

ToRecordArray() public méthode

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
Résultat System.Array

this() public méthode

Returns an item by its position
public this ( int index ) : SearchHit
index int
Résultat SearchHit