search builder with aggregates support

I would actually reverse this and have the default case be NOT an instance of search. This preserves the original semantics (which did not check type) for anything other than specific type.