SAN FRANCISCO — A federal judge on Tuesday lambasted the California Attorney General’s Office over harassing discovery requests in a lawsuit involving entertainment database company IMDb.com Inc.

U.S. District Judge Vince Chhabria said it was “an outright abuse of power” for the AG to request information about IMDb.com’s lobbying efforts and its communications with amici who have backed its First Amendment challenge against a state law limiting the site’s ability to publish ages of actors and others in Hollywood,