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.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdatastore/index.py b/gdatastore/index.py
index 177a300..9b43541 100644
--- a/gdatastore/index.py
+++ b/gdatastore/index.py
@@ -304,6 +304,15 @@ class Index(object):
return entries, total_count
+ def find_unique_values(self, property):
+ if property in _STANDARD_TERMS:
+ prefix = _PREFIX_FULL_VALUE + _STANDARD_TERMS[property]['prefix']
+ else:
+ prefix = _PREFIX_FULL_VALUE + _prefix_for_unknown(property)
+
+ return [term.term[len(prefix):]
+ for term in self._database.allterms(prefix)]
+
def retrieve(self, object_id):
postings = self._database.postlist(_object_id_term(object_id))
document = self._database.get_document(postings.next().docid)