You can create a webpart which can search for collection of terms using this method,
Term.GetTerms Method (String, Int32, Boolean, StringMatchOption, Int32, Boolean)
MSDN Source
Here's some sample code,
TaxonomyFieldValue v = null; // Notsurehowtodothisbit();
TaxonomySession session = new TaxonomySession(site);
if (session.TermStores != null && session.TermStores.Count > 0)
{
TermStore termStore = session.TermStores[0];
Term t = termStore.GetTerm(v.TermGuid);
Term parentTerm = t.Parent;
TermCollection childTerms = t.GetTerms();
}
Once you have the tree, you may be able to use a caml query to generate a SPList.GetList query that brings back anything tagged that way.
I have not done an experiment in this regard...
But Bart-Jan Hoeijmakers has
private SPListItemCollection GetItemsByTerm(Term term, SPList list)
{
// init some vars SPListItemCollection items = null;
SPSite site = SPContext.Current.Site; // set up the TaxonomySession
TaxonomySession session = new TaxonomySession(site);
// get the default termstore TermStore termStore = session.TermStores[0];
// If no wssid is found, the term is not used yet in the sitecollection, so no items exist using the term
int[] wssIds = TaxonomyField.GetWssIdsOfTerm(SPContext.Current.Site, termStore.Id, term.TermSet.Id, term.Id, false, 1);
if (wssIds.Length > 0)
{
// a TaxonomyField is a lookupfield. Constructing the SPQuery
SPQuery query = new SPQuery();
query.Query = String.Format("<Where><Eq><FieldRef Name='MyTaxonomyField' LookupId='TRUE' /><Value Type='Lookup'>{0}</Value></Eq></Where>", wssIds[0]);
items = list.GetItems(query);
}
return items;
}
Sample Code Source