Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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,))
Exemple #4
0
    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, ))
Exemple #5
0
    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)
Exemple #6
0
    def __iter__(self):
        """Returns the field objects in this schema.
        """

        return iter(itervalues(self._fields))
Exemple #7
0
    def __iter__(self):
        """Returns the field objects in this schema.
        """

        return iter(itervalues(self._fields))