Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gdatastore/index.py
diff options
context:
space:
mode:
Diffstat (limited to 'gdatastore/index.py')
-rw-r--r--gdatastore/index.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdatastore/index.py b/gdatastore/index.py
index 35491bf..4b0569a 100644
--- a/gdatastore/index.py
+++ b/gdatastore/index.py
@@ -302,6 +302,11 @@ class Index(object):
return entries, total_count
+ def retrieve(self, object_id):
+ postings = self._database.postlist(_object_id_term(object_id))
+ document = self._database.get_document(postings.next().docid)
+ return deserialise_metadata(document.get_data())
+
def store(self, object_id, properties):
logging.debug('store(%r, %r)', object_id, properties)
assert (properties['tree_id'], properties['version_id']) == object_id