Nested filtering with EPiServer Find
Some have already noticed one of the x2find mebers, Nested2Find, that enables nested object mappings and filtering to the EPiServer Find API. I would like to give a short description of what it does and how it can help you in some filtering scenarios.
Sometimes we need to be able to filter documents based on matching a specific object in a lists of complex objects on the document. Say for instance that we have documents that have a list of all authors that have contributed. Authors that all have a set of properties such as name and address. We then want to find all documents where one of the authors match a specific set of criterias, say all documents that have a swedish author named Henrik. This is what Nested2Find enables you to do. It lets you define nested lists of complex objects on a document for which you then later can specify a matching criteria when querying.
How to use the Nested2Find extension
Add the nested conventions to the conventions:
Create an object containing a NestedList<> of objects (NestedList<> is simply a typed List<>):
Index and start filtering:
or: