Commits

Anonymous committed 8786d39 Merge
  • Participants
  • Parent commits d3044c4, 31f7988

Comments (0)

Files changed (1)

File xodb/backends/xapian/spies.py

     number mapping.
     """
 
-    def __init__(self, schema, backend):
+    def __init__(self, schema, backend, facet_on=None):
         MatchDecider.__init__(self)
         self.documents_seen = 0
         self.values_seen = 0
         self.values = dict()
         self.schema = schema
         self.backend = backend
+        self.facet_on = facet_on
 
         for name,attr in schema.__attributes__.items():
             if attr.value:
+                if facet_on:
+                    if attr.name not in facet_on:
+                        continue
                 self.values[name] = {}
 
     def _tally(self, valname, value):