With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 workaround and 1 hack.
(
solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was callingGetSynthesisQueryable<>
with typeIStandardTemplateItem
for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.This resolved the issue.(workaround) If you for some reason can't do this sort of refactor or your case is caused by something slightly different, try changing the
ContentSearch.Solr.MaxNumberOfFieldsToProject
setting to "0". This worked for me also.. but the refactor is definitely the preferred method.(hack) Another way to fix this is to modify the template that generates all your Synthesis models so that they each include a new property that maps to the
_template
index field. For example:
public interface IAlertsDictionaryItem : IStandardTemplateItem
{
[IndexFieldAttribute("_template")]
ID Template { get; set; }
// ...
}
public class AlertsDictionary : StandardTemplateItem, IAlertsDictionaryItem
{
// ...
[IndexFieldAttribute("_template")]
public ID Template { get; set; }
// ...
}