Experiencing an unexpected behavior after updating to Find 12.3.3 where result projection fails under some circumstances.
The page model has a property in the form of a list of strings (IEnumerable). When it has a single item the result projection throws:
EPiServer.Find.ProjectionException: An exception of type ArgumentException was thrown while projecting field MetaStandardSettingBody$$string. ---> System.ArgumentException: Argument types do not match
Adding a second item to the list will make the projection work.
Looking into the Find-index both conditions seem to be stored as arrays, yet it seems that an array with a single value won't deserialize to an array.
This will fail:
"This will fail"
This will work:
"This will ..",
The projection is straight from an IEnumerable to an IEnumerable.
Anyone who have experienced similar problem?
We are experience similar a problem. We are using Find 188.8.131.52 but the problem occured when we renewed the developer indexes, not in production or test.
An exception of type ArgumentException was thrown while projecting field EducationArea.
at System.Linq.Expressions.Expression.Constant(Object value, Type type) at EPiServer.Find.ProjectionHelper.ReplaceExpressionWithConstantFromField(Dictionary`2 args, Expression expression)
at EPiServer.Find.ProjectionHelper.ReplaceExpressionWithConstantFromField(Dictionary`2 args, Expression expression) at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitMemberAssignment(MemberAssignment assignment) at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitBinding(MemberBinding binding) at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitBindingList(ReadOnlyCollection`1 original) at EPiServer.Find.Helpers.Linq.ExpressionVisitor.VisitMemberInit(MemberInitExpression init) at EPiServer.Find.Helpers.Linq.ExpressionVisitor.Visit(Expression exp) at EPiServer.Find.ProjectionHelper.ReplaceMemberAssignmentsWithFieldValues(Expression selector, Dictionary`2 args) at EPiServer.Find.ProjectionHelper.GetMappedSearchResultItem[TResult](SearchRequestBody requestBody, SearchHit`1 searchHit) at EPiServer.Find.ProjectionHelper.GetMappedResult[TResult](SearchRequestBody requestBody, SearchResults`1 jsonResult) at EPiServer.Find.SearchExtensions.GetProjectedResult[TResult](ISearch`1 search, SearchContext context) at EPiServer.Find.SearchExtensions.GetResult[TResult](ISearch`1 search) at ...
We are having the same problems, in multiple projects and different Find versions. The problem only occurs on developer indexes(so far).
Thanks for the feedback! We're also running on a newly renewed developer index, so it seems to be index related indeed.
We have also seen this error in several projects. The error occur when adding a new property or changing index. Using any other type than string causes an exception.
I have registered it with Episerver support
something similar: http://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2017/3/projectionexception-an-exception-of-type-invalidcastexception-was-thrown-while-projecting-field-price$$number/
Anyone affected by this should renew their development indices (this only affects es-eu-dev-api01.episerver.net).
made new development index, and i got assigned:
and still the same problem, so how do i get my index being hosted somewhere else?
@Henrik: I renewed the index, but that did not solve it.
reindexed today and it works even on: