Skip to main content
added 11 characters in body
Source Link

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 workaround and 1 hack.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem 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.

  2. (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.

  3. (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; }

    // ...
}

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 workaround and 1 hack.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

  3. (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; }

    // ...
}

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 workaround and 1 hack.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

  3. (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; }

    // ...
}
added 3rd solution option (in case option 2 couldn't be used for some reason)
Source Link

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 solutionworkaround and 1 workaroundhack.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

  3. (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; }

    // ...
}

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 solution and 1 workaround.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 workaround and 1 hack.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

  3. (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; }

    // ...
}
Found out that solution #1 didn't actually fix the problem
Source Link

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 solution and 1 workaround.

  1. (solutionsolution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 solution and 1 workaround.

  1. (solution) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

With the help of @MichaelWest and @benlipson I've identified the issue and have 2 solutions. Well really 1 solution and 1 workaround.

  1. (solution; actually this didn't fix it.. but good practice anyway) Ben pointed out that I was calling GetSynthesisQueryable<> with type IStandardTemplateItem for no good reason. Instead I refactored my code with generics so the actual Type I wanted back was used. This resolved the issue.

  2. (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.

Source Link
Loading