Generating unique integer hashes from text

I already have this index, that improves searching, but it doesn’t help in grouping:

    create(
      index("violations", ["(to_tsvector('english', help))"],
        name: :violations_help_vector,
        using: "GIN"
      )
    )