Last active
August 20, 2016 16:18
-
-
Save soen/d72a0c23e526c6bea31e7d6816ede584 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ISearchIndex index = ContentSearchManager.GetIndex("sitecore_master_index") | |
using (IProviderSearchContext context = index.CreateSearchContext()) | |
{ | |
// Notice that I've swapped out the 'SearchItemResult' with 'MySearchItemResult' | |
// in the method call GetQueryable<T>, and now I'm able to use the property | |
// 'MyTextField' in the filtering | |
var results = context.GetQueryable<MySearchItemResult>() | |
.Where(x => x.MyTextField.Contains("Some value")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment