November Happy Hour will be moved to Thursday December 5th.

Error occurs during the GetResult operation

Vote:
 

Hi,

Libraries hava installed in the application:

  • EPiServer Find 9.6.0.3185
  • Newtonsoft.Json 6.0.8

Imlementation:

    internal class ApplicationSearchClient : ISearchClient
    {
        private IClient Client { get; set; }

        public ApplicationSearchClient(IClient client)
        {
            Client = client;
        }

        public SearchResponse Search(Core.Models.SearchRequest request)
        {
            var articles = Client.Search().For(request.Query).GetResult();

            return new SearchResponse
            {
                Data = new
                {
                    epiServerContent = articles.Count()
                }
            };
        }
    }

Error: "Error setting value to 'Category' on 'Site.Models.Pages.ArticlePage'."

Internal error: "Property 'PageCategory' does not exist, can only assign values to existing properties"

How can we fix this?

#141653
Nov 17, 2015 14:26
Vote:
 

Hi,

You can use GetPagesResult() instead of GetResult(), or use projections.

#141654
Nov 17, 2015 15:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.