Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gdatastore/index.py
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2011-05-15 19:40:10 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2011-05-15 20:16:36 (GMT)
commitde83019b12aa3ec7e39f8dd69d9fb5b418db9dde (patch)
tree3e067016436772e8a2379faaa8c68131a916c4b3 /gdatastore/index.py
parent8701947aadc07bafccb3d13e17b21317e003bf2a (diff)
get completely rid of in-memory metadata storage
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
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