How do I get a sitecore item in Sitecore 7.2 by its field (of type droptree) value using Sitecore.ContentSearch?
I've tried: context.GetQueryable<SearchResultItem>().FirstOrDefault(resultItem=>resultItem["Field Name"]=="{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}");
but no luck. Any tips?
Guids get indexed in a normalized format (lower case, no hyphens or braces). So if you want to search in this way, I think you need to normalize your search term.
See the 'slightly complex queries' section of this blog post: http://www.xcentium.com/blog/2013/11/05/sitecore-7-linq-to-sitecore-simplified-part-1
By the way, if you do your query using a mapped POCO's rather than SearchResultItem then you can avoid having to manually do that normalization.