Created
April 9, 2020 09:01
-
-
Save evanxg852000/af4ec1ffbc80dfe3c047a17edd8b4444 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug)] | |
pub struct InvertedIndex { | |
count: u32, | |
docs: HashMap<u32, String>, | |
index: HashMap<String, HashMap<u32, u32>>, | |
} | |
impl InvertedIndex { | |
pub fn new() -> Self { | |
InvertedIndex { | |
count: 0, | |
docs: HashMap::new(), | |
index: HashMap::new(), | |
} | |
} | |
// ... other methods | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment