40
'results' => $results,
41
'form' => $form->createView(),
40
'results' => $results,
41
'form' => $form->createView(),
50
* The heart of TSEP: manages indexes, stopwords, ect.
54
* The following will be filled automatically by SubVersion!
55
* Do not change by hand!
58
* $LastChangedRevision$
62
class IndicesController extends AppController {
64
var $name = 'Indices';
66
var $uses = array('Index');
68
var $components = array('Indexer');
72
* @var IndexerComponent
81
function _start($auth_key) {
83
App::import('Vendor', 'start_script');
88
'controller' => 'indices',
100
function search ($profile = null, $page = null) {
102
$this->set('title_for_layout', 'Search Results');
104
//Don't care if the query is empty
105
$query = @$this->params['url']['q'];
109
$this->Index->Profile->Search->add($query);
111
$this->paginate = array(
112
'conditions' => array(
113
'MATCH(Index.text) AGAINST(? IN BOOLEAN MODE)' => array($query)
118
$matches = $this->paginate('Index');
120
unset($this->params['url']['url']);
122
//Truncate the results
124
foreach ($matches as $key => $match) {
126
$matches[$key]['Index']['text'] = substr($match['Index']['text'], 0, 255);
129
$this->set('matches', $matches);
132
$this->set('matches', array());
137
* Processes the indexing queue
141
$this->log('Run action called.');
146
$auth = $this->Indexer->processRequest($this->params['url']['auth']);
150
$this->_start($auth);
156
function admin_start ($id = null) {
160
$auth = $this->Indexer->submitRequest($id);
162
$this->_start($auth);
165
$this->redirect(array('controller'=>'profiles', 'action' => 'index'), null, true);
170
* List all of the indices
172
function admin_index() {
174
$this->paginate = array(
178
$this->set('indices', $this->paginate('Index'));
185
function admin_view () {
b'\\ No newline at end of file'
50
* The heart of TSEP: manages indexes, stopwords, ect.
54
* The following will be filled automatically by SubVersion!
55
* Do not change by hand!
58
* $LastChangedRevision$
62
class IndicesController extends AppController {
64
var $name = 'Indices';
66
var $uses = array('Index');
68
var $components = array('Indexer');
72
* @var IndexerComponent
81
function _start($auth_key) {
83
App::import('Vendor', 'start_script');
88
'controller' => 'indices',
100
function search ($profile = null, $page = null) {
102
$this->set('title_for_layout', 'Search Results');
104
//Don't care if the query is empty
105
$query = @$this->params['url']['q'];
109
$this->Index->Profile->Search->add($query);
111
$this->paginate = array(
112
'conditions' => array(
113
'MATCH(Index.text) AGAINST(? IN BOOLEAN MODE)' => array($query)
118
$matches = $this->paginate('Index');
120
unset($this->params['url']['url']);
122
//Truncate the results
124
foreach ($matches as $key => $match) {
126
$matches[$key]['Index']['text'] = substr($match['Index']['text'], 0, 255);
129
$this->set('matches', $matches);
132
$this->set('matches', array());
137
* Processes the indexing queue
141
$this->log('Run action called.');
146
$auth = $this->Indexer->processRequest($this->params['url']['auth']);
150
$this->_start($auth);
156
function admin_start ($id = null) {
160
$auth = $this->Indexer->submitRequest($id);
162
$this->_start($auth);
165
$this->redirect(array('controller'=>'profiles', 'action' => 'index'), null, true);
170
* List all of the indices
172
function admin_index() {
174
$this->paginate = array(
178
$this->set('indices', $this->paginate('Index'));
185
function admin_view () {