generate search capability only if search api is generated, too