Last active
December 8, 2020 13:47
-
-
Save prjseal/3c10ccc785e50b004ec1d85b28c89750 to your computer and use it in GitHub Desktop.
Get members using Examine
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
public IEnumerable<ISearchResult> GetMembersByKeys(string[] memberKeys) | |
{ | |
if (ExamineManager.Instance.TryGetIndex(Constants.UmbracoIndexes.MembersIndexName, out var index)) | |
{ | |
var searcher = index.GetSearcher(); | |
var criteria = searcher.CreateQuery(); | |
var query = criteria.GroupedOr(new[] { "__Key" }, memberKeys); | |
var searchResults = query.Execute(); | |
return searchResults; | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment