Skip to content

Search integration

misonou edited this page Sep 13, 2016 · 2 revisions

Search integration is the underlying feature that seamlessly enables the use of model classes to be extended to search results.

Generating keyword queries from CAML

By leveraging the CamlExpression class, the same query can be used in both normal list or site query and keyword search.

CamlExpression query = Caml.Equals("Title", "Sample Item");
KeywordQuery kq = SearchServiceHelper.CreateKeywordQueryFromCaml(site, query);
kq.QueryText; // (Title:"Sample Item")

List columns and managed properties

Since FAST Search is essentially a separate component from SharePoint and that it can serve as a general purpose site crawler, FAST Search has its own schema and handling of SharePoint contents.

FAST Search indexes columns from SharePoint as parts of the managed properties. There are some predefined managed property mappings for built-in columns and since SharePoint 2013, user created columns are also automatically mapped to managed properties.

// the following method maps given internal names of SharePoint columns
// to the mapped managed properties in FAST Search
SearchServiceHelper.GetManagedPropertyNames(internalNameArray);