def set_subsearcher(self, subsearcher, offset): child = self.child child.set_subsearcher(subsearcher, offset) # Tell each categorizer about the new subsearcher and offset for categorizer in itervalues(self.categorizers): categorizer.set_searcher(child.subsearcher, child.offset)
def __getitem__(self, name): """Returns the field associated with the given field name. """ if name in self._fields: return self._fields[name] for expr, fieldtype in itervalues(self._dyn_fields): if expr.match(name): return fieldtype raise KeyError("No field named %r" % (name,))
def __getitem__(self, name): """Returns the field associated with the given field name. """ if name in self._fields: return self._fields[name] for expr, fieldtype in itervalues(self._dyn_fields): if expr.match(name): return fieldtype raise KeyError("No field named %r" % (name, ))
def set_subsearcher(self, subsearcher, offset): WrappingCollector.set_subsearcher(self, subsearcher, offset) # Tell each categorizer about the new subsearcher and offset for categorizer in itervalues(self.categorizers): categorizer.set_searcher(self.child.subsearcher, self.child.offset)
def __iter__(self): """Returns the field objects in this schema. """ return iter(itervalues(self._fields))