Naanou.Common.Search
Class SearchQuery

A search query, which is made up of parts.

E.g., filename search for 'Morcheeba Big Calm - The Sea' would become:

            Search
            -> SearchComponent("filename", "morcheeba", {"big", "calm", "sea"});
            -> SearchComponent("filename", "big",	{"morcheeba", "calm", "sea"});
            -> SearchComponent("filename", "calm", {"morcheeba", "big", "sea"});
            -> SearchComponent("filename", "sea", {"morcheeba", "big", "calm"});  
            

Field Summary
int maxResults
int partCount
Naanou.Common.Search.SearchPart[] parts

Constructor Summary
SearchQuery(int maxResults)
         Constructor

Property Summary
int MaxResults
         Gets the max results to return
Naanou.Common.Search.SearchPart[] Parts
         Gets the parts array (copied)

Method Summary
void Add(Naanou.Common.Search.SearchPart newPart)
         Adds a new search part
string Dump()
         Dumps details of query and all contained parts

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


Field Detail

maxResults

private int maxResults


partCount

private int partCount


parts

private Naanou.Common.Search.SearchPart[] parts

Constructor Detail

SearchQuery

public SearchQuery(int maxResults)

Constructor

Parameters:
maxResults - Maximum number of results to get
Property Detail

MaxResults

public int MaxResults

Gets the max results to return


Parts

public Naanou.Common.Search.SearchPart[] Parts

Gets the parts array (copied)

Method Detail

Add

public void Add(Naanou.Common.Search.SearchPart newPart)

Adds a new search part

Parameters:
newPart - Part to add

Dump

public string Dump()

Dumps details of query and all contained parts

Returns:
Details of query and all contained parts