From 222063b19dad77f3807c665c94cca63057c7a27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 30 Oct 2020 11:46:00 +0100 Subject: [PATCH] Introduce the Index path method --- src/index.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.rs b/src/index.rs index a7b55b552..0520ae041 100644 --- a/src/index.rs +++ b/src/index.rs @@ -59,6 +59,11 @@ impl Index { self.env.read_txn() } + /// Returns the canonicalized path where the heed `Env` of this `Index` lives. + pub fn path(&self) -> &Path { + self.env.path() + } + /// Writes the documents ids that corresponds to the user-ids-documents-ids FST. pub fn put_documents_ids(&self, wtxn: &mut heed::RwTxn, docids: &RoaringBitmap) -> heed::Result<()> { self.main.put::<_, Str, RoaringBitmapCodec>(wtxn, DOCUMENTS_IDS_KEY, docids)