protected function setUp() { parent::setUp(); $this->tripodTransactionLog = new \Tripod\Mongo\TransactionLog(); $this->tripodTransactionLog->purgeAllTransactions(); $this->tripod = new \Tripod\Mongo\Driver('CBD_testing', 'tripod_php_testing'); $this->indexer = new \Tripod\Mongo\Composites\SearchIndexer($this->tripod); $this->searchProvider = new \Tripod\Mongo\MongoSearchProvider($this->tripod); $this->getTripodCollection($this->tripod)->drop(); $this->loadBaseSearchDataViaTripod(); foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForSearch($this->tripod->getStoreName()) as $collection) { $collection->drop(); } // index all the documents $cursor = $this->getTripodCollection($this->tripod)->find(array("rdf:type.u" => array('$in' => array("bibo:Book"))), array('_id' => 1, 'rdf:type' => 1)); //->limit(20); foreach ($cursor as $result) { $t = array(); if (isset($result['rdf:type']['u'])) { $t[] = $result['rdf:type']['u']; } else { foreach ($result['rdf:type'] as $_t) { $t[] = $_t['u']; } } $this->indexer->generateAndIndexSearchDocuments($result['_id']['r'], $result['_id']['c'], $this->tripod->getPodName()); } }
protected function setUp() { parent::setUp(); $this->tripod = new \Tripod\Mongo\Driver("CBD_testing", "tripod_php_testing", array("async" => array(OP_VIEWS => true, OP_TABLES => true, OP_SEARCH => false))); foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForSearch($this->tripod->getStoreName()) as $collection) { $collection->drop(); } $this->loadResourceDataViaTripod(); $this->loadBaseSearchDataViaTripod(); }
protected function setUp() { parent::setUp(); $this->tripod = new \Tripod\Mongo\Driver('CBD_testing', 'tripod_php_testing'); $this->getTripodCollection($this->tripod)->drop(); $this->loadBaseSearchDataViaTripod(); foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForSearch($this->tripod->getStoreName()) as $collection) { $collection->drop(); } }
public function setUp() { parent::setUp(); $this->originalConfig = \Tripod\Mongo\Config::getConfig(); \Tripod\Mongo\Config::setValidationLevel(\Tripod\Mongo\Config::VALIDATE_MAX); }