Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Can you add code for the classes Variant and ListingDates. Do they have navigation properties going both ways?
Hi Daniel,
No, they don't - the ProductListingDateRange class has just 3 properties:
public class ProductListingDateRange { public virtual string MarketId { get; set; } public virtual DateTime? ListedFrom { get; set; } public virtual DateTime? ListedTo { get; set; } }
And the variant class exposes a collection of these as an IEnumerable.
Thanks
I had a similar issue and I solved it by using the NestedFilter property on my NestedFilterExpression
So try changing your return statement to this.
return new FilterExpression<IContent>(x => x.MatchType(typeof(Variant.Models.Variant)) & ((Variant.Models.Variant)x).ListingDates.MatchItem(item => exp.NestedFilter));
Hi,
We are getting the same error stacktrace described in this post:
http://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2014/8/Indexing-issues/
But we're getting it when attempting to do a nested search in Find. We have a nested convention applied:
Where listing dates is a collection of a custom object type.
And in the search query:
DateTime now = DateTime.Now; var exp = new NestedFilterExpression(
item => item.ListingDates,
item => item.ListedFrom.Exists() & item.ListedFrom.LessThan(now) & item.ListedTo.Exists() & item.ListedTo.LessThan(now),
SearchClient.Instance.Conventions);
return new FilterExpression(x =>
x.MatchType(typeof(Variant.Models.Variant)) &
((Variant.Models.Variant)x).ListingDates.MatchItem(item => exp));
It blows up with the error text 'Self referencing loop detected for property 'ManifestModule' - the JSON.NET serializer seems to be choking on a recursive reference within the Assembly, though why it's trying to serialize the assembly I have no idea!
Any pointers appreciated as to whether this is a bug or a problem with the way we're using Find.