Ensure clearing facet map

This commit is contained in:
Paul Makepeace 2011-06-23 09:48:16 +00:00
parent 5e544bb827
commit 9a461607b9
1 changed files with 2 additions and 1 deletions

View File

@ -206,7 +206,7 @@ class FacetsResponse(object):
class Engine(object):
"""An Engine keeps track of Facets, and responses to facet computation."""
facets = []
facet_index_by_id = {} # index into facets by Facet object id
facet_index_by_id = {} # dict of facets by Facet object id
def __init__(self, facets=None, mode='row-based'):
self.set_facets(facets)
@ -243,6 +243,7 @@ class Engine(object):
def remove_all(self):
"""Remove all facets."""
self.facet_index_by_id = {}
self.facets = []
def reset_all(self):