Try our conversational search powered by Generative AI!

OrFilter with nestedExpression

Vote:
 

I'm trying to search on a property of a nested object in Find.  I need to build this up dynamically as we are searching for multiple values at once.  I was looking at something similar to the below, but I see the OrFilter extension method does not support nested expressions.

                foreach (var mid in midsList)
                {
                    if (!string.IsNullOrWhiteSpace(mid))
                    {
                        query.OrFilter(x => x.ProductVariantData(), v => v.Code.Match(mid.Trim()));
                    }
                }

Is there another approach to this anyone can think of?

Many thanks,

Dave

#269881
Jan 12, 2022 12:50
Vote:
 

Resolved, found the answer here https://world.optimizely.com/documentation/Items/Developers-Guide/EPiServer-Find/11/DotNET-Client-API/Searching/nested-queries/

#269888
Jan 12, 2022 15:52
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.