Last active
May 18, 2017 13:57
-
-
Save dampee/1a8b03dbfcf7c1bc8cd2beea8662b3d4 to your computer and use it in GitHub Desktop.
Search media on nodename without descendants
This file contains hidden or 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
var internalSearchProvider = ExamineManager.Instance.SearchProviderCollection["InternalSearcher"]; | |
var query = ExamineManager.Instance.CreateSearchCriteria() | |
.NodeTypeAlias("image") | |
.And().NodeName("Desert.jpg".ToLowerInvariant()) | |
.Compile(); | |
var results = Umbraco.TypedSearch(query, internalSearchProvider); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment