I want to group a vector by key when the key is a vector.
struct Document {
    categories: Vec<String>,
    body: String
}
let docs = vec![
    Document {categories: ["rust".to_string(), body: "doc1".to_string()]},
    Document {categories: ["clojure".to_string()], body: "doc2".to_string()},
    Document {categories: ["java".to_string()], body: "doc3".to_string()},
    Document {categories: ["rust".to_string(), "clojure".to_string], body: "doc4".to_string()}
];
I want to return like below (category_key, documents)
"rust" => [doc1, doc4]  
"clojure" => [doc2, doc4]  
"java" => [doc3]