public function aroundReindex(
        \Magento\Catalog\Model\Category $subject,
        callable $proceed
    ) {
        $proceed();

        if (!empty($subject->getAffectedProductIds())) {
            $this->processFullTextIndex($subject->getAffectedProductIds());
        }

        return;
    }
public function aroundReindex(
        \Magento\Catalog\Model\Category $subject,
        callable $proceed
    ) {
        $proceed();

        if (!empty($subject->getAffectedProductIds())) {
            $this->processFullTextIndex($subject->getAffectedProductIds());
        }

        return;
    }
public function aroundReindex ( \ Magento \ Catalog \ Model \ Category $ subject , callable $ proceed ) { $ proceed ( ) ; if ( ! empty ( $ subject -> getAffectedProductIds ( ) ) ) { $ this -> processFullTextIndex ( $ subject -> getAffectedProductIds ( ) ) ; } return ; }
Reindex category's products after reindexing the category

@param \Magento\Catalog\Model\Category $subject The cateogry being reindexed
@param callable                        $proceed The parent function we are plugged on
: Magento\Catalog\Model\Category::reindex()

@return \Magento\Catalog\Model\Category
Reindex category s products after reindexing the category