From 9a461607b93d1fdd4dc1f8045c3615cdcc4b095f Mon Sep 17 00:00:00 2001 From: Paul Makepeace Date: Thu, 23 Jun 2011 09:48:16 +0000 Subject: [PATCH] Ensure clearing facet map --- google/refine/facet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google/refine/facet.py b/google/refine/facet.py index e6132f1..ffa8c65 100644 --- a/google/refine/facet.py +++ b/google/refine/facet.py @@ -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):