Smile\ElasticsuiteThesaurus\Model\ResourceModel\Indexer\Thesaurus::getBaseSelect PHP Method

getBaseSelect() private method

Base select for thesaurus terms select by store id.
private getBaseSelect ( integer $storeId, string $type ) : Magento\Framework\DB\Select
$storeId integer Store id.
$type string Type of thesaurus (synonym or expansion).
return Magento\Framework\DB\Select
    private function getBaseSelect($storeId, $type)
    {
        $connection = $this->getConnection();
        $select = $connection->select();
        $select->from(['thesaurus' => $this->getMainTable()], [])->join(['terms' => $this->getTable(ThesaurusInterface::EXPANSION_TABLE_NAME)], 'thesaurus.thesaurus_id = terms.thesaurus_id', [])->join(['store' => $this->getTable(ThesaurusInterface::STORE_TABLE_NAME)], 'store.thesaurus_id = thesaurus.thesaurus_id', [])->group(['thesaurus.thesaurus_id', 'terms.term_id'])->where("thesaurus.type = ?", $type)->where('thesaurus.is_active = 1')->where('store.store_id IN (?)', [0, $storeId]);
        return $select;
    }