def add_rule(self, directory, policy):
    '\n        Registers a new directory to index. Does nothing if the given directory is already added.\n\n        Parameters\n        ----------\n        directory : str\n            The directory to be indexed.\n        policy : IndexerPolicy\n            A policy that applies to this directory.\n        '
    analyzer = self._create_analyzer(policy)
    analyzer_store = self._create_analyzerstore(directory)
    analyzer_store.add_analyzer(policy.extensions, analyzer)
Registers a new directory to index. Does nothing if the given directory is already added.

Parameters
----------
directory : str
    The directory to be indexed.
policy : IndexerPolicy
    A policy that applies to this directory.
def add_rule(self, directory, policy):
    '\n        Registers a new directory to index. Does nothing if the given directory is already added.\n\n        Parameters\n        ----------\n        directory : str\n            The directory to be indexed.\n        policy : IndexerPolicy\n            A policy that applies to this directory.\n        '
    analyzer = self._create_analyzer(policy)
    analyzer_store = self._create_analyzerstore(directory)
    analyzer_store.add_analyzer(policy.extensions, analyzer)