November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi!
If you search for PageData you need to either project the result to some other type using the Select method or use the GetPagesResult/GetContentResult method.
Hi!
Was looking into the GetPagesResult but couldn't find out what it was doing. Using it would get rid of the YSOD but also cut down the resultset from 469 to 10. So is there som magic happening with the GetPagesResult that has a pagination on 10 or something?
Hmm, both GetResult and GetPages result defaults to a resultset of 10, which can be tweaked using the Take method. Or do you mean that the TotalMatching property changes from 469 to 10?
Right, so it's just me not knowing the API. =)
TotalMatching is till 469 so we are all good.
Thanks!
Getting a YSOD when calling on the GetResults() for my query. There seems to be a pagelink that can't be deserialized. Anyone got any tip on how to find what document in the index it's failing on?
To me it looks like it would be on hit[0]
If I check that in the index I find this
Error below:
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'EPiServer.Find.Cms.IndexablePageReference' 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.ShortcutLink.ID$$number', line 1, position 1303.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'EPiServer.Find.Cms.IndexablePageReference' 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.ShortcutLink.ID$$number', line 1, position 1303.
Source Error:
Line 100: if (pageQuery.Count() > 0) Line 101: { Line 102: var resultet = pageQuery.GetResult(); Line 103: } Line 104:
Source File: c:\Source\RF\SvenskidrottOnline\IOWeb\Development\IOF\IOF\templates\EPiFind\SearchPage.aspx.cs Line: 102
Stack Trace: