diff --git a/raptor/src/metadata.rs b/raptor/src/metadata.rs index 80d647f0b..3958e6647 100644 --- a/raptor/src/metadata.rs +++ b/raptor/src/metadata.rs @@ -118,13 +118,17 @@ impl Metadata { { let map = Map::from_path(map)?; let indexes = DocIndexes::from_path(indexes)?; - Ok(Metadata { map, indexes }) + Ok(Metadata::from_raw(map, indexes)) } pub fn from_bytes(map: Vec, indexes: Vec) -> Result> { let map = Map::from_bytes(map)?; let indexes = DocIndexes::from_bytes(indexes)?; - Ok(Metadata { map, indexes }) + Ok(Metadata::from_raw(map, indexes)) + } + + pub fn from_raw(map: Map, indexes: DocIndexes) -> Self { + Metadata { map, indexes } } pub fn get>(&self, key: K) -> Option<&[DocIndex]> {