The Filter generator allows you to hide from your structure issues that don't pass certain criteria. You can use JQL, Text and S-JQL queries.
Once you add this generator, you will only see the items from the structure that pass the query and their parents. The parents are necessary to show the issues without breaking the hierarchy.
Filtering by Sprint (and predefined Hide Closed Sprints) is limited to inserted structure(s), not to the whole structure. Also, as these filters apply to Sprint folders rather than issues themselves, Show all sub-items of matching items is made redundant.