Vulnerability in EPiServer.Forms
I wonder if there is a good practice in Truffler/Find to do do a filter based on children to the pages that are hits?
For example: I want to search for all pages of a certain pagetype but I neeed to filter out the ones that has childrens of a certain type or has a certain property - it doesn't need to be realtime so the request can be to the index not the db.
Currently I am just asking for a maximum resultset and filter it out after the GetResult() but that is way to performance heavy since I need to ask for 1000 results (Or even do more requests since the max is 1000), do a filtering on my own and then prestent just the 10 first hits (It's a paged resultset).
We are using EPiServer 7 with update 1 and latest version of Find from EPiServer NuGet.
Is the best way to solve this by adding properties that calls GetChidren() and get the data from those children needed for the filter or is there a better way of doing it?
First, the index is almost "realtime". You could achieve this by adding a boolean extension method to your pages that you include when you are indexing the pages http://find.episerver.com/Documentation/dotnet-api-including-fields.
And you could also set dependencies to the pages, so if any of the child pages is updated, the parent is re-indexed too http://find.episerver.com/Documentation/episerver-cms7-integration-related-content
That seem like a good solution, thank you! :)
Damn Johan, you're getting too good at Find! Soon I have no reason to visit this forum ;-)