search can be nil I think, you don't have to set any search and for some resources you even can't so maybe not required?