Naanou.Search
Class ResultAggregator

Aggregates search results.

Results come in from multiple remote nodes asynchronously from request. The result aggregator manages these replies and presents them in a ListView control. When the same resource (keyed on content hash) is reported, the results of that resource are aggregated under the one line in the ListView control. It increases the 'Sources' count, and modifies to Confidence level to reflect this.

Field Summary
Naanou.Search.Filters filters
System.Collections.Hashtable hash
System.Windows.Forms.ListView list
Naanou.Search.ISearchPanel search
int sourceColIndex

Constructor Summary
ResultAggregator(Naanou.Search.Filters filters, Naanou.Search.ISearchPanel search, System.Windows.Forms.ListView list, int sourceColIndex)
         Constructor

Method Summary
void Add(Naanou.Common.Search.SearchResult result)
         Adds a new search result
void Add(Naanou.Common.Search.SearchResult result, Naanou.Common.IEntry entry)
void Merge(Naanou.Search.ResultAggregate ra, Naanou.Common.Search.SearchResult result, Naanou.Common.IEntry entry)

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

filters

private Naanou.Search.Filters filters


hash

private System.Collections.Hashtable hash


list

private System.Windows.Forms.ListView list


search

private Naanou.Search.ISearchPanel search


sourceColIndex

private int sourceColIndex

Constructor Detail

ResultAggregator

public ResultAggregator(Naanou.Search.Filters filters,
                        Naanou.Search.ISearchPanel search,
                        System.Windows.Forms.ListView list,
                        int sourceColIndex)

Constructor

Parameters:
search - Search panel
list - ListView to use
sourceColIndex - Index that contains the source column
Method Detail

Add

public void Add(Naanou.Common.Search.SearchResult result)

Adds a new search result

Parameters:
result - Result to add

Add

private void Add(Naanou.Common.Search.SearchResult result,
                 Naanou.Common.IEntry entry)


Merge

private void Merge(Naanou.Search.ResultAggregate ra,
                   Naanou.Common.Search.SearchResult result,
                   Naanou.Common.IEntry entry)