AI OnAI Off
Hi,
try this:
SearchClient.Instance.Search<PageData>().For(Query).GetContentResult()
You can find more info here: http://find.episerver.com/Documentation/episerver-cms7-integration-getcontentresult-and-getfilesresult
I'm implementing EPiServer Find on a CMS 7 site just upgraded from CMS 6 R2 and when using UnifiedSearch everything works fine but if I try to specify a type in the search I get the following error:
Exception Details: Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'EPiServer.Core.XhtmlString' because the type requires a JSON string value to deserialize correctly.
To fix this error either change the JSON to a JSON string value or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'hits.hits[0]._source.MainBody.IsEmpty$$bool', line 1, position 834.
Works:
Do not work: