def reindex_resource(resource, oid=None, action_mode=None):
    """Register the resource in indexes of this catalog using objectid
        ``oid``.  If ``oid`` is not supplied, the ``__oid__`` of the
        ``resource`` will be used.  ``action_mode``, if supplied, should be one
        of ``None``, :attr:`~substanced.interfaces.MODE_IMMEDIATE`,
        :attr:`~substanced.interfaces.MODE_ATCOMMIT` or
        :attr:`~substanced.interfaces.MODE_DEFERRED` indicating when the
        updates should take effect.  The ``action_mode`` value will overrule
        any action mode that a member index has been configured with.

        The result of calling this method is logically the same as calling
        ``unindex_resource``, then ``index_resource`` for the same resource/oid
        combination, but calling those two methods in succession is often more
        expensive than calling this single method, as member indexes can choose
        to do smarter things during a reindex than what they would do during an
        unindex then an index.
        """
