Skip to content

Commit

Permalink
Add a unique_values API to field index.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Jun 6, 2013
1 parent ab84961 commit 0378426
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Next release
------------

- Add a ``unique_values`` API to field index.

1.0a6 (2013-05-30)
------------------

Expand Down
5 changes: 5 additions & 0 deletions hypatia/field/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ def reset(self):
self._num_docs = Length(0)
self._not_indexed = self.family.IF.TreeSet()

def unique_values(self):
""" Return the unique values in the index for all docids as an iterable
"""
return self._fwd_index.keys()

def not_indexed(self):
return self._not_indexed

Expand Down

0 comments on commit 0378426

Please sign in to comment.