search must point to a layer with at least one valid query